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

DependencyConstraintHandler

@Incubating interface DependencyConstraintHandler

A DependencyConstraintHandler is used to declare dependency constraints.

Since
4.5

Functions

add

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

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.