api / org.gradle.api.artifacts.dsl / DependencyConstraintHandler / add

add

abstract fun add(configurationName: String, dependencyConstraintNotation: Any): DependencyConstraint

Adds a dependency constraint to the given configuration.

Parameters

configurationName - The name of the configuration.

dependencyConstraintNotation - the constraint

abstract fun add(configurationName: String, dependencyNotation: Any, configureAction: Action<in DependencyConstraint>): DependencyConstraint

Adds a dependency constraint to the given configuration, and configures the dependency constraint using the given closure.

Parameters

configurationName - The name of the configuration.

dependencyNotation - The dependency constraint notation

configureAction - The closure to use to configure the dependency constraint.