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.

JavaLanguageVersion

Represents a Java Language version

Since

6.7

Functions

Link copied to clipboard
abstract fun asInt(): Int
Return this version as a number, 14 for Java 14.
Link copied to clipboard
abstract fun canCompileOrRun(otherVersion: Int): Boolean
Indicates if this version can compile or run code based on the passed in language version.
Link copied to clipboard
abstract fun compareTo(p: T): Int
Link copied to clipboard
Get the current (i.e., the current runtime) Java Language version.
Link copied to clipboard
open fun of(version: Int): JavaLanguageVersion
open fun of(version: String): JavaLanguageVersion
Of.
Link copied to clipboard
abstract fun toString(): String
Return this version as a String, "14" for Java 14.