Package org.gradle.api.artifacts.dsl
Interface DependencyConstraintFactory
-
@NonExtensible @Incubating public interface DependencyConstraintFactory
Factory class for creatingDependencyConstraintinstances, 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
Inject.Note: This interface is not intended for implementation by build script or plugin authors.
- Since:
- 8.7
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DependencyConstraintcreate(java.lang.CharSequence dependencyConstraintNotation)Create aDependencyConstraintfrom the"group:name:version"notation.DependencyConstraintcreate(java.lang.String group, java.lang.String name, java.lang.String version)Create aDependencyConstraintfrom a series of strings.DependencyConstraintcreate(MinimalExternalModuleDependency dependency)Create aDependencyConstraintfrom aMinimalExternalModuleDependency.DependencyConstraintcreate(ProjectDependency project)Create aDependencyConstraintfrom aProjectDependency.
-
-
-
Method Detail
-
create
DependencyConstraint create(java.lang.CharSequence dependencyConstraintNotation)
Create aDependencyConstraintfrom the"group:name:version"notation.Note that no classifier or extension is accepted here.
- Parameters:
dependencyConstraintNotation- the dependency constraint notation- Returns:
- the new dependency constraint
- Since:
- 8.7
-
create
DependencyConstraint create(@Nullable java.lang.String group, java.lang.String name, @Nullable java.lang.String version)
Create aDependencyConstraintfrom a series of strings.- Parameters:
group- the group (optional)name- the nameversion- the version (optional)- Returns:
- the new dependency constraint
- Since:
- 8.7
-
create
DependencyConstraint create(MinimalExternalModuleDependency dependency)
Create aDependencyConstraintfrom aMinimalExternalModuleDependency.- Parameters:
dependency- the dependency- Returns:
- the new dependency constraint
- Since:
- 8.7
-
create
DependencyConstraint create(ProjectDependency project)
Create aDependencyConstraintfrom aProjectDependency.- Parameters:
project- the project dependency- Returns:
- the new dependency constraint
- Since:
- 8.7
-
-