Package org.gradle.api.artifacts
Interface DependencyMetadata
-
@Incubating public interface DependencyMetadata
Describes a dependency declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file, Ivy file, Maven POM). This interface can be used to adjust a dependency's properties via metadata rules (seeComponentMetadataHandler
.- Since:
- 4.4
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getGroup()
Returns the group of the module that is targeted by this dependency.String
getName()
Returns the name of the module that is targeted by this dependency.String
getVersion()
Returns the version of the module that is targeted by this dependency, which usually expresses what API level of the module you are compatible with.DependencyMetadata
setVersion(String version)
Adjust the version constraints of the dependency.
-
-
-
Method Detail
-
getGroup
String getGroup()
Returns the group of the module that is targeted by this dependency. The group allows the definition of modules of the same name in different organizations or contexts.
-
getName
String getName()
Returns the name of the module that is targeted by this dependency.
-
getVersion
String getVersion()
Returns the version of the module that is targeted by this dependency, which usually expresses what API level of the module you are compatible with.
-
setVersion
DependencyMetadata setVersion(String version)
Adjust the version constraints of the dependency.- Parameters:
version
- version in string notation
-
-