Base repo configuration. Tracks values pulled from configuration properties and locates credentials either in the credential store or from the environment.
| Modifiers | Name | Description |
|---|---|---|
protected java.lang.String |
alternateUserName |
|
protected groovy.lang.Closure<java.lang.String> |
getCredentialsPrefix |
|
protected groovy.lang.Closure<java.lang.String> |
getEnvVarPrefix |
|
protected boolean |
ignoreEnvironment |
|
protected java.lang.String |
name |
|
protected java.lang.String |
password |
|
protected org.gradle.api.Project |
project |
|
protected boolean |
publish |
|
protected java.lang.String |
username |
| Type | Name and description |
|---|---|
groovy.lang.Closure<java.util.List<java.lang.String>> |
dependencyUrlsGenerator |
groovy.lang.Closure<java.lang.String> |
publishUrlGenerator |
| Constructor and description |
|---|
RepoManagement.RepoConfig
(org.gradle.api.Project project, java.util.Map props) |
RepoManagement.RepoConfig
(org.gradle.api.Project project, java.lang.String alternateUserName, java.util.Map props) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected void |
applyProps(java.util.Map props)Apply the properties from the configuration map. |
|
org.gradle.api.artifacts.repositories.PasswordCredentials |
getCredentials()@return Credentials object to use in repo configuration |
|
java.util.List<java.lang.String> |
getDependencyUrls()@return The list of URLs to add as repositories for dependency resolution |
|
java.lang.String |
getPublishUrl()@return The URL to configure for publishing to this repository |
|
java.lang.String |
getPublishUrl(boolean release)@param release Pass true to get the release URL and false to get the snapshot URL |
|
protected void |
resolveCredentials()Try to find the username/password credentials for this repo. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Apply the properties from the configuration map. Minimal validation, just ensure that the 'publish' property, if specified, is a boolean
props - Properties to apply
release - Pass true to get the release URL and false to get the snapshot URL Try to find the username/password credentials for this repo. Any username/password specified in the
configuration properties take precedence. If not specified, we check the environment first for a
variable named [name]_NEXUS_USERNAME and [name]_NEXUS_PASSWORD. If those don't exist,
then we try the credentials plugin store using the property names [name]RepoUsername and
[name]RepoPassword with the 'name' converted to lower case.
If an 'alternateUserName' has been configured and no values were found using the primary name, then we
repeat search using the alternate name.
Groovy Documentation