gradle
8.6

# DependencyMetadata

interface DependencyMetadata<SELF : DependencyMetadata?>(source)

Describes a metadata about a dependency - direct dependency or dependency constraint - declared in a resolved component's metadata.

#### Parameters

<SELF>

type extending this interface

#### Inheritors

DirectDependencyMetadata
DependencyConstraintMetadata

## Functions

attributes
Link copied to clipboard
abstract fun attributes(configureAction: Action<out Any>): SELF
Adjust the attributes of this dependency
because
Link copied to clipboard
abstract fun because(reason: String): SELF
Adjust the reason why this dependency should be selected.
getAttributes
Link copied to clipboard
abstract fun getAttributes(): AttributeContainer
Returns the attributes of this dependency.
getGroup
Link copied to clipboard
abstract fun getGroup(): String
Returns the group of the module that is targeted by this dependency or dependency constraint.
getModule
Link copied to clipboard
abstract fun getModule(): ModuleIdentifier
The module identifier of the component.
getName
Link copied to clipboard
abstract fun getName(): String
Returns the name of the module that is targeted by this dependency or dependency constraint.
getReason
Link copied to clipboard
@Nullable
abstract fun getReason(): String
Returns the reason why this dependency should be selected.
getVersionConstraint
Link copied to clipboard
abstract fun getVersionConstraint(): VersionConstraint
Returns the version of the module that is targeted by this dependency or dependency constraint.
version
Link copied to clipboard
abstract fun version(configureAction: Action<out Any>): SELF
Adjust the version constraints of the dependency or dependency constraint.