# constraint

open fun constraint(dependencyConstraintNotation: CharSequence): DependencyConstraint(source)

Create a DependencyConstraint from the given notation.

#### Return

the new dependency constraint

#### Since

8.7

#### Parameters

dependencyConstraintNotation

dependency constraint to add

#### See also

DependencyConstraintFactory

Valid dependency constraint notation for this method

@Incubating
open fun constraint(dependencyConstraint: Provider<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>(source)
@Incubating
open fun constraint(dependencyConstraint: ProviderConvertible<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>(source)

Create a DependencyConstraint from a minimal dependency.

#### Return

the new dependency constraint

#### Since

8.7

#### Parameters

dependencyConstraint

dependency constraint to add

open fun constraint(project: ProjectDependency): DependencyConstraint(source)

Create a DependencyConstraint from a project.

#### Return

the new dependency constraint

#### Since

8.7

#### Parameters

project

the project