From e241d5f802244278236a7dc848846419b72262f9 Mon Sep 17 00:00:00 2001 From: Sebastian Hartte Date: Sun, 26 May 2024 14:31:29 +0200 Subject: [PATCH] Make javac target release 21 --- .../neoform/runtime/actions/RecompileSourcesActionWithJDK.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/net/neoforged/neoform/runtime/actions/RecompileSourcesActionWithJDK.java b/src/main/java/net/neoforged/neoform/runtime/actions/RecompileSourcesActionWithJDK.java index fac1a92..71c7203 100644 --- a/src/main/java/net/neoforged/neoform/runtime/actions/RecompileSourcesActionWithJDK.java +++ b/src/main/java/net/neoforged/neoform/runtime/actions/RecompileSourcesActionWithJDK.java @@ -30,6 +30,8 @@ public void run(ProcessingEnvironment environment) throws IOException, Interrupt var classpath = getEffectiveClasspath(environment); var javaCompilerOptions = new ArrayList(); + javaCompilerOptions.add("--release"); + javaCompilerOptions.add("21"); javaCompilerOptions.add("-proc:none"); // No annotation processing on Minecraft sources javaCompilerOptions.add("-nowarn"); // We have no influence on Minecraft sources, so no warnings javaCompilerOptions.add("-g"); // Gradle compiles with debug by default, so we replicate this