Use JetBrains runtime for run tasks

allows for better runtime class redefinition

closes #10459
This commit is contained in:
Jason Penilla 2024-04-27 17:27:32 -07:00
parent c4adb2b7c7
commit a7e0798f78

View file

@ -107,7 +107,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ workingDir = rootProject.layout.projectDirectory
+ .dir(providers.gradleProperty("paper.runWorkDir").getOrElse("run"))
+ .asFile
+ javaLauncher.set(project.javaToolchains.launcherFor(project.java.toolchain))
+ javaLauncher.set(project.javaToolchains.launcherFor {
+ languageVersion.set(JavaLanguageVersion.of(21))
+ vendor.set(JvmVendorSpec.JETBRAINS)
+ })
+ jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:+AllowRedefinitionToAddDeleteMethods")
+
+ if (rootProject.childProjects["test-plugin"] != null) {
+ val testPluginJar = rootProject.project(":test-plugin").tasks.jar.flatMap { it.archiveFile }