Package org.gradle.api.artifacts
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 (see
ComponentMetadataHandler
.- Since:
- 4.4
-
Method Summary
Modifier and TypeMethodDescriptiongetGroup()
Returns the group of the module that is targeted by this dependency.getName()
Returns the name of the module that is targeted by this dependency.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
(String version) Adjust the version constraints of the dependency.
-
Method Details
-
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
Adjust the version constraints of the dependency.- Parameters:
version
- version in string notation
-