diff --git a/build.gradle.kts b/build.gradle.kts index 47fc1ed9..10cc689d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -121,7 +121,16 @@ tasks { gradleVersion = providers.gradleProperty("gradleVersion").get() } + fun supportsEnhancedClassRedefinition(): Boolean { + val platformVersion = findProperty("platformVersion").toString().toFloatOrNull() + return platformVersion != null + && platformVersion >= 2024.1 + } + runIde { + if (supportsEnhancedClassRedefinition()) { + jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:HotswapAgent=fatjar") + } systemProperty("com.redhat.devtools.intellij.telemetry.mode", "debug") findProperty("tools.dl.path")?.let { systemProperty("tools.dl.path", it) } //systemProperty("jboss.sandbox.api.endpoint", "http://localhost:3000") // enable when running sandbox locally, see below