Skip to content

build: fix JVM crash when switching between IDE MV builds #5955

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,13 @@ intellijPlatform {
tasks.prepareSandbox {
val pluginName = intellijPlatform.projectName

intoChild(pluginName.map { "$it/dotnet" })
.from(resharperDlls)
from(resharperDlls) {
into(pluginName.map { "$it/dotnet" })
}

intoChild(pluginName.map { "$it/gateway-resources" })
.from(gatewayResources)
from(gatewayResources) {
into(pluginName.map { "$it/gateway-resources" })
}
}

// We have no source in this project, so skip test task
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ detekt = "1.23.8"
diff-util = "4.12"
intellijExt = "1.1.8"
# match with <root>/settings.gradle.kts
intellijGradle = "2.6.0"
intellijGradle = "2.7.1"
intellijRemoteRobot = "0.11.22"
jackson = "2.17.2"
jacoco = "0.8.12"
Expand Down
10 changes: 6 additions & 4 deletions plugins/amazonq/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ val prepareBundledFlare by tasks.registering(Copy::class) {
}

tasks.withType<PrepareSandboxTask>().configureEach {
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(file("contrib/QCT-Maven-6-16.jar"))
intoChild(intellijPlatform.projectName.map { "$it/flare" })
.from(prepareBundledFlare)
from(file("contrib/QCT-Maven-6-16.jar")) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
from(prepareBundledFlare) {
into(intellijPlatform.projectName.map { "$it/flare" })
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ tasks.prepareTestSandbox {
val pluginXmlJar = project(":plugin-amazonq").tasks.jar

dependsOn(pluginXmlJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(pluginXmlJar)
from(pluginXmlJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ tasks.prepareTestSandbox {
val pluginXmlJar = project(":plugin-amazonq").tasks.jar

dependsOn(pluginXmlJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(pluginXmlJar)
from(pluginXmlJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ tasks.prepareTestSandbox {
val pluginXmlJar = project(":plugin-amazonq").tasks.jar

dependsOn(pluginXmlJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(pluginXmlJar)
from(pluginXmlJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
5 changes: 3 additions & 2 deletions plugins/amazonq/shared/jetbrains-community/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ tasks.prepareTestSandbox {
val pluginXmlJar = project(":plugin-amazonq").tasks.jar

dependsOn(pluginXmlJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(pluginXmlJar)
from(pluginXmlJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
5 changes: 3 additions & 2 deletions plugins/core/jetbrains-community/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ tasks.prepareTestSandbox {
val pluginXmlJar = project(":plugin-core").tasks.jar

dependsOn(pluginXmlJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(pluginXmlJar)
from(pluginXmlJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
10 changes: 6 additions & 4 deletions plugins/toolkit/jetbrains-gateway/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ tasks.jar {
}

tasks.withType<PrepareSandboxTask>().configureEach {
intoChild(intellijPlatform.projectName.map { "$it/gateway-resources" })
.from(gatewayResourcesDir)
from(gatewayResourcesDir) {
into(intellijPlatform.projectName.map { "$it/gateway-resources" })
}
}

listOf(
Expand All @@ -150,8 +151,9 @@ listOf(
runtimeClasspath.setFrom(gatewayOnlyRuntimeClasspath)

dependsOn(gatewayOnlyResourcesJar)
intoChild(intellijPlatform.projectName.map { "$it/lib" })
.from(gatewayOnlyResourcesJar)
from(gatewayOnlyResourcesJar) {
into(intellijPlatform.projectName.map { "$it/lib" })
}
}
}

Expand Down
5 changes: 3 additions & 2 deletions plugins/toolkit/jetbrains-rider/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,9 @@ tasks.withType<PrepareSandboxTask>().configureEach {

dependsOn(resharperDllsDir)

intoChild(intellijPlatform.projectName.map { "$it/dotnet" })
.from(resharperDllsDir)
from(resharperDllsDir) {
into(intellijPlatform.projectName.map { "$it/dotnet" })
}
}

tasks.compileKotlin {
Expand Down
1 change: 1 addition & 0 deletions sandbox-all/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import software.aws.toolkits.gradle.intellij.IdeFlavor
import software.aws.toolkits.gradle.intellij.toolkitIntelliJ

plugins {
id("toolkit-jvm-conventions")
id("toolkit-intellij-plugin")
id("toolkit-publish-root-conventions")
}
Expand Down
26 changes: 19 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,32 @@ val codeArtifactMavenRepo = fun RepositoryHandler.(): MavenArtifactRepository? {
} else {
null
}
}.also {
pluginManagement {
repositories {
it()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
gradlePluginPortal()
}

pluginManagement {
repositories {
// unfortunately pluginManagement is special, so we need to duplicate
val codeArtifactUrl: Provider<String> = providers.environmentVariable("CODEARTIFACT_URL")
val codeArtifactToken: Provider<String> = providers.environmentVariable("CODEARTIFACT_AUTH_TOKEN")
if (codeArtifactUrl.isPresent && codeArtifactToken.isPresent) {
maven {
url = uri(codeArtifactUrl.get())
credentials {
username = "aws"
password = codeArtifactToken.get()
}
}
}

gradlePluginPortal()
maven("https://central.sonatype.com/repository/maven-snapshots/")
}
}

plugins {
id("com.github.burrunan.s3-build-cache") version "1.5"
id("com.gradle.develocity") version "3.17.6"
id("org.jetbrains.intellij.platform.settings") version "2.6.0"
id("org.jetbrains.intellij.platform.settings") version "2.7.1"
}

dependencyResolutionManagement {
Expand Down
Loading