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.

version

abstract fun version(alias: String, versionSpec: Action<in MutableVersionConstraint>): String(source)

Configures a dependency version which can then be referenced using the versionRef )} method.

Return

the version alias name

Since

7.0

Parameters

alias

an identifier for the version

versionSpec

the dependency version spec


abstract fun version(alias: String, version: String): String(source)

Configures a dependency version which can then be referenced using the versionRef method.

Since

7.0

Parameters

alias

an identifier for the version

version

the version alias name