Skip to content

Downloading by version

The DSL extension offers a download method to configure a JavaLanguageVersion. The plugin infers the matching Jextract version from that defined Java version. It downloads and installs Jextract from the official release page for the current build platform.

By convention, the plugin tries to get the Java version from the configured Java toolchain. This is by far the most convenient and reliable method for most projects.

build.gradle.kts
java {
toolchain {
languageVersion = JavaLanguageVersion.of(24)
}
}

Setting an explicit version in the DSL will override the convention, and the Java toolchain will be ignored. This might make sense if no Java plugin is used in the build, or if the version should diverge from the target JVM.

build.gradle.kts
jextract.download(JavaLanguageVersion.of(21))