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.

setGradleVersion

open fun setGradleVersion(gradleVersion: String)(source)

The version of the gradle distribution required by the wrapper. This is usually the same version of Gradle you use for building your project. The following labels are allowed to specify a version: latest, release-candidate, release-milestone, release-nightly, and nightly

The resulting distribution url is validated before it is written to the gradle-wrapper.properties file, unless getValidateDistributionUrl is false.

Since

0.7