From 719d72c7259d85875e2bc96010d96a3d846a6eab Mon Sep 17 00:00:00 2001 From: Andre Dietisheim Date: Fri, 13 Dec 2024 16:29:48 +0100 Subject: [PATCH] chore: allow hotswap in 'runIde' for >=IC-2024.1 Signed-off-by: Andre Dietisheim --- build.gradle.kts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 14f8499e7..656ddeede 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -110,11 +110,20 @@ intellijPlatform { } tasks { + fun supportsEnhancedClassRedefinition(): Boolean { + val platformVersion = findProperty("platformVersion").toString().toFloatOrNull() + return platformVersion != null + && platformVersion >= 2024.1 + } + wrapper { gradleVersion = providers.gradleProperty("gradleVersion").get() } runIde { + if (supportsEnhancedClassRedefinition()) { + jvmArgs("-XX:+AllowEnhancedClassRedefinition", "-XX:HotswapAgent=fatjar") + } systemProperty("com.redhat.devtools.intellij.telemetry.mode", "debug") }