For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

create

abstract fun create(dependencyConstraintNotation: CharSequence): DependencyConstraint(source)

Create a DependencyConstraint from the "group:name:version" notation.

Note that no classifier or extension is accepted here.

Return

the new dependency constraint

Since

8.7

Parameters

dependencyConstraintNotation

the dependency constraint notation


abstract fun create(@Nullable group: @Nullable String, name: String, @Nullable version: @Nullable String): DependencyConstraint(source)

Create a DependencyConstraint from a series of strings.

Return

the new dependency constraint

Since

8.7

Parameters

group

the group (optional)

name

the name

version

the version (optional)


Create a DependencyConstraint from a MinimalExternalModuleDependency.

Return

the new dependency constraint

Since

8.7

Parameters

dependency

the dependency


Create a DependencyConstraint from a ProjectDependency.

Return

the new dependency constraint

Since

8.7

Parameters

project

the project dependency