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.

getMajorVersion

abstract fun getMajorVersion(): Int(source)

Returns the major version of this Gradle version.

For example, if the version is "9.3-rc-1", the major version is 9.

Return

The major version.

Since

9.0.0