# constraint

open fun constraint(dependencyConstraintNotation: CharSequence): DependencyConstraint

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>
@Incubating
open fun constraint(dependencyConstraint: ProviderConvertible<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>

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

Create a DependencyConstraint from a project.

#### Return

the new dependency constraint

#### Since

8.7

#### Parameters

project

the project