diff --git a/paper-api-generator/build.gradle.kts b/paper-api-generator/build.gradle.kts index 62ceb696a5..e1e434773a 100644 --- a/paper-api-generator/build.gradle.kts +++ b/paper-api-generator/build.gradle.kts @@ -1,5 +1,6 @@ import io.papermc.paperweight.PaperweightSourceGeneratorHelper import io.papermc.paperweight.extension.PaperweightSourceGeneratorExt +import io.papermc.paperweight.util.defaultJavaLauncher plugins { java @@ -25,6 +26,7 @@ tasks.register("generate") { mainClass.set("io.papermc.generator.Main") classpath(sourceSets.main.map { it.runtimeClasspath }) args(projectDir.toPath().resolve("generated").toString()) + javaLauncher = javaToolchains.defaultJavaLauncher(project) } tasks.test {