# DependencyConstraintHandler

interface DependencyConstraintHandler(source)

A `DependencyConstraintHandler` is used to declare dependency constraints.

#### Since

4.5

## Functions

add
Link copied to clipboard
abstract fun add(configurationName: String, dependencyConstraintNotation: Any): DependencyConstraint
Adds a dependency constraint to the given configuration.
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.
create
Link copied to clipboard
abstract fun create(dependencyConstraintNotation: Any): DependencyConstraint
Creates a dependency constraint without adding it to a configuration.
abstract fun create(dependencyConstraintNotation: Any, configureAction: Action<in DependencyConstraint>): DependencyConstraint
Creates a dependency constraint without adding it to a configuration, and configures the dependency constraint using the given closure.
enforcedPlatform
Link copied to clipboard
abstract fun enforcedPlatform(notation: Any): DependencyConstraint
abstract fun enforcedPlatform(notation: Any, configureAction: Action<in DependencyConstraint>): DependencyConstraint
Declares a constraint on an enforced platform.
invoke
Link copied to clipboard
operator fun DependencyConstraintHandler. invoke(configuration: DependencyConstraintHandlerScope.() -> Unit)

Configures the dependency constraints.