Skip to content

Gradle ​

Catalog v8.

Installs Gradle on the JDK of the Java toolchain.

Select ​

toml
[toolchains]
java = "21"
gradle = "9"

Gradle needs java in the same table. Choose both in the [toolchains] table of limanix.toml and apply the change. Gradle and Maven can be selected together.

Versions ​

ValueGradleRuns onNotes
99.xJava 17 to 25Recommended
88.xJava 24 or older

Lines come from the base Nixpkgs revision and receive their updates with each catalog release. Select one line per VM.

A Gradle line that does not support the selected Java line stops the build:

text
gradle 8 runs on Java 24 or older: choose a newer gradle line or an older java line in [toolchains]

Use ​

Inside the VM, from a directory that contains a Gradle build:

console
gradle build

gradle --version shows the JDK under Launcher JVM. A project with ./gradlew runs the Gradle version that it pins, on the same JDK.

Gradle and ./gradlew find the selected JDK at /usr/lib/jvm. A build that asks for another Java version through a Java toolchain makes Gradle download that JDK; see other JDKs.

Configuration and integration
BoundaryContract
SettingsGradle runs on lmx.capabilities.jdk.package
Personal stateCaches and wrapper distributions in ~/.gradle
IntegrationImports the Java toolchain; rejects a Java line that the Gradle line does not support
ServicesGradle starts its build daemon on demand

Free and open source under the Apache License 2.0.