Skip to content

Gradle is too old for Java 25

Checked against Gradle’s compatibility matrix and Fabric’s and NeoForge’s 26.1 notes on 2 November 2026.

Minecraft 26.1 needs Java 25. Each Gradle version supports Java only up to a point, so a mod that moves to 26.1 on an old Gradle wrapper fails to build. NeoForge says 26.1 needs Gradle 9.1.0 or newer (NeoForge, 24 March 2026).

From Gradle’s compatibility matrix:

Java Compiling with it (toolchains) Running Gradle on it
17 Gradle 7.3 7.3 and newer
21 Gradle 8.4 8.5 and newer
25 Gradle 9.1.0 9.1.0 and newer

The same table shows that Gradle 9 runs only on Java 17 or newer. You can still build a Java 8 mod with Gradle 9: Gradle runs on a newer Java and compiles the mod with a Java 8 toolchain.

The Gradle version is in gradle/wrapper/gradle-wrapper.properties. Either let Gradle update it, as Fabric’s porting page does (Fabric: Porting to 26.1):

Terminal window
./gradlew wrapper --gradle-version latest

Or change the version in distributionUrl by hand, as NeoForge’s post suggests:

distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip

Then refresh Gradle. Linen’s pinned 26.x templates use Gradle 9.7.1 (Fabric, Paper) and 9.2.1 (NeoForge, from its MDKs).

For 26.1 the loader’s Gradle plugin changes too: Fabric moves to the net.fabricmc.fabric-loom plugin, and NeoForge asks for a current ModDevGradle or NeoGradle. See Port a mod to 26.1.

Linen installs the Java version a project needs. New mod writes the Gradle wrapper and plugin versions listed in Set up by loader.