Package org.gradle.api.artifacts
Interface Dependency
- All Known Subinterfaces:
- ExternalDependency,- ExternalModuleDependency,- FileCollectionDependency,- MinimalExternalModuleDependency,- ModuleDependency,- ProjectDependency
public interface Dependency
A 
Dependency represents a dependency on the artifacts from a particular source. A source can be an Ivy
 module, a Maven POM, another Gradle project, a collection of Files, etc... A source can have zero or more artifacts.- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionvoidSets the reason why this dependency should be used.copy()Creates and returns a new dependency with the property values of this one.@Nullable StringgetGroup()Returns the group of this dependency.getName()Returns the name of this dependency.@Nullable StringReturns a reason why this dependency should be used, in particular with regards to its version.@Nullable StringReturns the version of this dependency.
- 
Field Details- 
DEFAULT_CONFIGURATION- See Also:
 
- 
ARCHIVES_CONFIGURATION- See Also:
 
- 
CLASSIFIER- See Also:
 
 
- 
- 
Method Details- 
getGroup@Nullable String getGroup()Returns the group of this dependency. The group is often required to find the artifacts of a dependency in a repository. For example, the group name corresponds to a directory name in a Maven like repository. Might return null.
- 
getNameString getName()Returns the name of this dependency. The name is almost always required to find the artifacts of a dependency in a repository. Never returns null.
- 
getVersion@Nullable String getVersion()Returns the version of this dependency. The version is often required to find the artifacts of a dependency in a repository. For example the version name corresponds to a directory name in a Maven like repository. Might return null.
- 
copyDependency copy()Creates and returns a new dependency with the property values of this one.- Returns:
- The copy. Never returns null.
 
- 
getReason@Nullable String getReason()Returns a reason why this dependency should be used, in particular with regards to its version. The dependency report will use it to explain why a specific dependency was selected, or why a specific dependency version was used.- Returns:
- a reason to use this dependency
- Since:
- 4.6
 
- 
becauseSets the reason why this dependency should be used.- Since:
- 4.6
 
 
-