gradle
8.3

# DirectDependencyMetadata

interface DirectDependencyMetadata : DependencyMetadata<SELF>

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 org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

## Functions

attributes
Link copied to clipboard
abstract fun attributes(configureAction: Action<out Any>): SELF
because
Link copied to clipboard
abstract fun because(reason: String): SELF
doNotEndorseStrictVersions
Link copied to clipboard
abstract fun doNotEndorseStrictVersions()
Resets the isEndorsingStrictVersions state of this dependency.
endorseStrictVersions
Link copied to clipboard
abstract fun endorseStrictVersions()
Endorse version constraints with getStrictVersion strict versions} from the target module.
getArtifactSelectors
Link copied to clipboard
abstract fun getArtifactSelectors(): List<DependencyArtifact>
Returns additional artifact information associated with the dependency that is used to select artifacts in the targeted module.
getAttributes
Link copied to clipboard
abstract fun getAttributes(): AttributeContainer
getGroup
Link copied to clipboard
abstract fun getGroup(): String
getModule
Link copied to clipboard
abstract fun getModule(): ModuleIdentifier
getName
Link copied to clipboard
abstract fun getName(): String
getReason
Link copied to clipboard
abstract fun getReason(): String
getVersionConstraint
Link copied to clipboard
abstract fun getVersionConstraint(): VersionConstraint
isEndorsingStrictVersions
Link copied to clipboard
abstract fun isEndorsingStrictVersions(): Boolean
Are the getStrictVersion strict version} dependency constraints of the target module endorsed?
version
Link copied to clipboard
abstract fun version(configureAction: Action<out Any>): SELF