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.

getJavaVersion

Java version to be used by generated Java projects. When set, Gradle will use the provided value as the target major Java version for all relevant generated projects. Gradle will validate the number to ensure it is a valid and supported major version.

Return

the java version number supplied by the user

Since

8.5