api / org.gradle.api.artifacts / DependencyConstraintsMetadata

DependencyConstraintsMetadata

@Incubating interface DependencyConstraintsMetadata : DependenciesMetadata<DependencyConstraintMetadata>

Describes the dependency constraints of a variant declared in a resolved component's metadata, which typically originate from a component descriptor (Gradle metadata file). This interface can be used to adjust the dependencies of a published component via metadata rules (see org.gradle.api.artifacts.dsl.ComponentMetadataHandler.

Since
4.5

Inherited Functions

add

abstract fun add(dependencyNotation: String): Unit
abstract fun add(dependencyNotation: String, configureAction: Action<in T>): Unit

Add a dependency or a dependency constraint using the string notation: group:name:version.

abstract fun add(dependencyNotation: MutableMap<String, String>): Unit
abstract fun add(dependencyNotation: MutableMap<String, String>, configureAction: Action<in T>): Unit

Add a dependency or a dependency constraint using the map notation: group: group, name: name, version: version.