-
Notifications
You must be signed in to change notification settings - Fork 276
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interfaces: add credentials to public interface
- Loading branch information
Showing
4 changed files
with
76 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
scalafmt-interfaces/src/main/java/org/scalafmt/interfaces/RepositoryCredential.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.scalafmt.interfaces; | ||
|
||
public final class RepositoryCredential { | ||
public final String host; | ||
public final String username; | ||
public final String password; | ||
public final String realm; | ||
|
||
public RepositoryCredential(String host, String username, String password) { | ||
this(host, username, password, ""); | ||
} | ||
|
||
public RepositoryCredential(String host, String username, String password, String realm) { | ||
this.host = host; | ||
this.username = username; | ||
this.password = password; | ||
this.realm = realm; | ||
} | ||
|
||
public interface ScalafmtExtension { | ||
|
||
/** | ||
* Builder method. | ||
* | ||
* @param credentials maven repository credentials to use when resolving | ||
* @return an updated interface instance | ||
*/ | ||
Scalafmt withRepositoryCredentials(RepositoryCredential... credentials); | ||
|
||
} | ||
|
||
} |