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

The Java language version used when parsing Java source files, e.g. JavaLanguageVersion.of(17).

Groovydoc uses the JavaParser library to read Java sources; this controls the source level it assumes, which is needed for parsing newer Java language constructs (for example, sealed classes require Java 17). When unset, Groovydoc uses the JavaParser library's own default.

Only has an effect with Groovy 4.0.27 or later; the option is silently ignored with earlier Groovy versions.

Since

9.8.0