Skip to content

Commit 6209636

Browse files
authored
build: fix JVM crash when switching between IDE MV builds (#5955)
In 252, the coroutine debug agent has a new JAR entrypoint. Due to a platform plugin bug, Gradle will always cache the agent jar, which results in a class not found crash when launching the IDE.
1 parent 07c5741 commit 6209636

File tree

12 files changed

+57
-32
lines changed

12 files changed

+57
-32
lines changed

buildSrc/src/main/kotlin/temp-toolkit-intellij-root-conventions.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ intellijPlatform {
5353
tasks.prepareSandbox {
5454
val pluginName = intellijPlatform.projectName
5555

56-
intoChild(pluginName.map { "$it/dotnet" })
57-
.from(resharperDlls)
56+
from(resharperDlls) {
57+
into(pluginName.map { "$it/dotnet" })
58+
}
5859

59-
intoChild(pluginName.map { "$it/gateway-resources" })
60-
.from(gatewayResources)
60+
from(gatewayResources) {
61+
into(pluginName.map { "$it/gateway-resources" })
62+
}
6163
}
6264

6365
// We have no source in this project, so skip test task

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ detekt = "1.23.8"
1010
diff-util = "4.12"
1111
intellijExt = "1.1.8"
1212
# match with <root>/settings.gradle.kts
13-
intellijGradle = "2.6.0"
13+
intellijGradle = "2.7.1"
1414
intellijRemoteRobot = "0.11.22"
1515
jackson = "2.17.2"
1616
jacoco = "0.8.12"

plugins/amazonq/build.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ val prepareBundledFlare by tasks.registering(Copy::class) {
133133
}
134134

135135
tasks.withType<PrepareSandboxTask>().configureEach {
136-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
137-
.from(file("contrib/QCT-Maven-6-16.jar"))
138-
intoChild(intellijPlatform.projectName.map { "$it/flare" })
139-
.from(prepareBundledFlare)
136+
from(file("contrib/QCT-Maven-6-16.jar")) {
137+
into(intellijPlatform.projectName.map { "$it/lib" })
138+
}
139+
from(prepareBundledFlare) {
140+
into(intellijPlatform.projectName.map { "$it/flare" })
141+
}
140142
}

plugins/amazonq/codetransform/jetbrains-community/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ tasks.prepareTestSandbox {
3232
val pluginXmlJar = project(":plugin-amazonq").tasks.jar
3333

3434
dependsOn(pluginXmlJar)
35-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
36-
.from(pluginXmlJar)
35+
from(pluginXmlJar) {
36+
into(intellijPlatform.projectName.map { "$it/lib" })
37+
}
3738
}

plugins/amazonq/codewhisperer/jetbrains-community/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tasks.prepareTestSandbox {
3131
val pluginXmlJar = project(":plugin-amazonq").tasks.jar
3232

3333
dependsOn(pluginXmlJar)
34-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
35-
.from(pluginXmlJar)
34+
from(pluginXmlJar) {
35+
into(intellijPlatform.projectName.map { "$it/lib" })
36+
}
3637
}

plugins/amazonq/codewhisperer/jetbrains-ultimate/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ tasks.prepareTestSandbox {
3131
val pluginXmlJar = project(":plugin-amazonq").tasks.jar
3232

3333
dependsOn(pluginXmlJar)
34-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
35-
.from(pluginXmlJar)
34+
from(pluginXmlJar) {
35+
into(intellijPlatform.projectName.map { "$it/lib" })
36+
}
3637
}

plugins/amazonq/shared/jetbrains-community/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ tasks.prepareTestSandbox {
3030
val pluginXmlJar = project(":plugin-amazonq").tasks.jar
3131

3232
dependsOn(pluginXmlJar)
33-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
34-
.from(pluginXmlJar)
33+
from(pluginXmlJar) {
34+
into(intellijPlatform.projectName.map { "$it/lib" })
35+
}
3536
}

plugins/core/jetbrains-community/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ tasks.prepareTestSandbox {
9595
val pluginXmlJar = project(":plugin-core").tasks.jar
9696

9797
dependsOn(pluginXmlJar)
98-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
99-
.from(pluginXmlJar)
98+
from(pluginXmlJar) {
99+
into(intellijPlatform.projectName.map { "$it/lib" })
100+
}
100101
}

plugins/toolkit/jetbrains-gateway/build.gradle.kts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ tasks.jar {
138138
}
139139

140140
tasks.withType<PrepareSandboxTask>().configureEach {
141-
intoChild(intellijPlatform.projectName.map { "$it/gateway-resources" })
142-
.from(gatewayResourcesDir)
141+
from(gatewayResourcesDir) {
142+
into(intellijPlatform.projectName.map { "$it/gateway-resources" })
143+
}
143144
}
144145

145146
listOf(
@@ -150,8 +151,9 @@ listOf(
150151
runtimeClasspath.setFrom(gatewayOnlyRuntimeClasspath)
151152

152153
dependsOn(gatewayOnlyResourcesJar)
153-
intoChild(intellijPlatform.projectName.map { "$it/lib" })
154-
.from(gatewayOnlyResourcesJar)
154+
from(gatewayOnlyResourcesJar) {
155+
into(intellijPlatform.projectName.map { "$it/lib" })
156+
}
155157
}
156158
}
157159

plugins/toolkit/jetbrains-rider/build.gradle.kts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,9 @@ tasks.withType<PrepareSandboxTask>().configureEach {
338338

339339
dependsOn(resharperDllsDir)
340340

341-
intoChild(intellijPlatform.projectName.map { "$it/dotnet" })
342-
.from(resharperDllsDir)
341+
from(resharperDllsDir) {
342+
into(intellijPlatform.projectName.map { "$it/dotnet" })
343+
}
343344
}
344345

345346
tasks.compileKotlin {

0 commit comments

Comments
 (0)