# DependencyConstraintFactory

@NonExtensible
@Incubating
@ServiceScope(value = Build::class)
interface DependencyConstraintFactory(source)

Factory class for creating DependencyConstraint instances, with strong typing.

An instance of the factory can be injected into a task, plugin or other object by annotating a public constructor or property getter method with javax.inject.Inject.

Note: This interface is not intended for implementation by build script or plugin authors.

#### Since

8.7

## Functions

create
Link copied to clipboard
abstract fun create(dependencyConstraintNotation: CharSequence): DependencyConstraint
Create a DependencyConstraint from the `"group:name:version"` notation.
abstract fun create(dependency: MinimalExternalModuleDependency): DependencyConstraint
Create a DependencyConstraint from a MinimalExternalModuleDependency.
abstract fun create(project: ProjectDependency): DependencyConstraint
Create a DependencyConstraint from a ProjectDependency.
abstract fun create(@Nullable group: String, name: String, @Nullable version: String): DependencyConstraint
Create a DependencyConstraint from a series of strings.