diff --git a/common/src/main/java/net/neoforged/gradle/common/extensions/JavaVersionManager.java b/common/src/main/java/net/neoforged/gradle/common/extensions/JavaVersionManager.java index 608d1057a..9621741ab 100644 --- a/common/src/main/java/net/neoforged/gradle/common/extensions/JavaVersionManager.java +++ b/common/src/main/java/net/neoforged/gradle/common/extensions/JavaVersionManager.java @@ -24,6 +24,6 @@ public void setJavaVersion(int javaVersion, String context) { } this.javaVersion = javaVersion; - project.getExtensions().getByType(JavaPluginExtension.class).getToolchain().getLanguageVersion().set(JavaLanguageVersion.of(javaVersion)); + project.getExtensions().getByType(JavaPluginExtension.class).getToolchain().getLanguageVersion().convention(JavaLanguageVersion.of(javaVersion)); } }