Gradle
Catalog v8.
Installs Gradle on the JDK of the Java toolchain.
Select
[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
| Value | Gradle | Runs on | Notes |
|---|---|---|---|
9 | 9.x | Java 17 to 25 | Recommended |
8 | 8.x | Java 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:
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:
gradle buildgradle --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
| Boundary | Contract |
|---|---|
| Settings | Gradle runs on lmx.capabilities.jdk.package |
| Personal state | Caches and wrapper distributions in ~/.gradle |
| Integration | Imports the Java toolchain; rejects a Java line that the Gradle line does not support |
| Services | Gradle starts its build daemon on demand |
