gradle
8.3

# DependencyConstraintHandler

interface DependencyConstraintHandler

A `DependencyConstraintHandler` is used to declare dependency constraints.

## 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<out Any>): 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<out Any>): 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<out Any>): DependencyConstraint
Declares a constraint on an enforced platform.
invoke
Link copied to clipboard
operator fun DependencyConstraintHandler.invoke(configuration: DependencyConstraintHandlerScope.() -> Unit)

Configures the dependency constraints.