Specification of a dependency, for example an external module dependency or a project dependency.
| Type | Name and description |
|---|---|
java.util.List<ArtifactSpec> |
artifactsThe dependency's artifacts. |
java.lang.String |
configurationThe name of the dependency's configuration. |
java.util.List<ExclusionSpec> |
exclusionsThe dependency's exclusions. |
| Constructor and description |
|---|
DependencySpec
(java.lang.String pConfiguration, java.lang.String pGroup, java.lang.String pName, java.lang.String pVersion)Create a new DependencySpec. |
| Type | Name and description |
|---|---|
void |
addArtifact(java.lang.String pName, java.lang.String pType, java.lang.String pExtension, java.lang.String pClassifier, java.lang.String pUrl)Add an artifact specification to this dependency. |
void |
addExclusion(java.lang.String pGroup, java.lang.String pModule)Add an exclusion specification to this dependency. |
java.lang.String |
asMapNotation()Get the map notation for this specification. |
java.lang.String |
asStringNotation()Get the string notation for this dependency. |
boolean |
isProjectDependency()Check if the keys indicating a project dependency have values. |
boolean |
matches(java.lang.String pGroup, java.lang.String pName, java.lang.String pVersion)Check if this specification has a certain name, group, and version. |
void |
setChanging(boolean pIsChanging)Set the value for the changing key. |
void |
setClassifier(java.lang.String pClassifier)Set the value for the classifier key. |
void |
setExtension(java.lang.String pExtension)Set the value for the ext key. |
void |
setForce(boolean pIsForce)Set the value for the force key. |
void |
setProject(org.gradle.api.Project pProject)Set the values of a project dependency. |
void |
setTransitive(boolean pIsTransitive)Set the value for the transitive key. |
| Methods inherited from class | Name |
|---|---|
class MapBasedSpec |
asMapNotation, getBoolean, putBoolean, putValue |
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() |
The dependency's artifacts.
The name of the dependency's configuration.
The dependency's exclusions.
Create a new DependencySpec.
pConfiguration - The name of the dependency's configuration.pGroup - The dependency's group.pName - The dependency's name.pVersion - The dependency's version.Add an artifact specification to this dependency.
pName - The name of the artifact.pType - The artifact's type. Normally the same value as the extension, e.g.
"jar".pExtension - The artifact's extension. Normally the same value as the type.pClassifier - The artifact's classifier.pUrl - The URL under which the artifact can be retrieved.Add an exclusion specification to this dependency.
pGroup - The exclusion's group.pModule - The exclusion's module.Get the map notation for this specification.
Get the string notation for this dependency.
Check if the keys indicating a project dependency have values.
Check if this specification has a certain name, group, and version.
pGroup - The group to match, or null to ignore the group value.pName - The name to match.pVersion - The version to match, or null to ignore the group value. Set the value for the changing key.
pIsChanging - The changing value. Set the value for the classifier key.
pClassifier - The classifier value. If this value is null the key will be removed from
the specification's mapping. Set the value for the ext key.
pExtension - The extension value. If this value is null the key will be removed from
the specification's mapping. Set the value for the force key.
pIsForce - The force value.Set the values of a project dependency. This will remove any keys related to external module dependencies.
pProject - The project of this dependency. Set the value for the transitive key.
pIsTransitive - The transitive value.Groovy Documentation