From 23a1d7779d36af9aee0bf2a53334af19da0005e4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 18:33:02 +0000 Subject: [PATCH 1/3] Bump kotlin from 2.0.0 to 2.0.20 Bumps `kotlin` from 2.0.0 to 2.0.20. Updates `org.jetbrains.kotlin:kotlin-gradle-plugin` from 2.0.0 to 2.0.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.0...v2.0.20) Updates `org.jetbrains.kotlin:kotlin-reflect` from 2.0.0 to 2.0.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.0...v2.0.20) Updates `org.jetbrains.kotlin:kotlin-stdlib-jdk8` from 2.0.0 to 2.0.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.0...v2.0.20) Updates `org.jetbrains.kotlin:kotlin-test-junit` from 2.0.0 to 2.0.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.0...v2.0.20) Updates `org.jetbrains.kotlin.jvm` from 2.0.0 to 2.0.20 - [Release notes](https://github.com/JetBrains/kotlin/releases) - [Changelog](https://github.com/JetBrains/kotlin/blob/v2.0.20/ChangeLog.md) - [Commits](https://github.com/JetBrains/kotlin/compare/v2.0.0...v2.0.20) --- updated-dependencies: - dependency-name: org.jetbrains.kotlin:kotlin-gradle-plugin dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-reflect dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-stdlib-jdk8 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin:kotlin-test-junit dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlin.jvm dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 348c1c9ed0c..c4cc2f47aea 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,7 +17,7 @@ junit4 = "4.13.2" junit5 = "5.11.0" # https://plugins.jetbrains.com/docs/intellij/kotlin.html#adding-kotlin-support # https://kotlinlang.org/docs/releases.html#release-details -kotlin = "2.0.0" +kotlin = "2.0.20" # set in /settings.gradle.kts kotlinCoroutines = "1.8.0" mockito = "5.12.0" From 85957dc7a80eae3e079643cf5d94dbcebea18de0 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Tue, 3 Sep 2024 15:10:02 -0700 Subject: [PATCH 2/3] conventions --- .../toolkit-intellij-subplugin.gradle.kts | 26 ++++++++++++++----- .../toolkit-kotlin-conventions.gradle.kts | 12 +++------ gradle/libs.versions.toml | 4 +-- kotlinResolution.settings.gradle.kts | 2 +- plugins/core/core/build.gradle.kts | 4 +++ plugins/core/resources/build.gradle.kts | 2 ++ .../toolkit/jetbrains-rider/build.gradle.kts | 11 -------- 7 files changed, 31 insertions(+), 30 deletions(-) diff --git a/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts b/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts index 3d412ade791..dc7dfbd450c 100644 --- a/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-intellij-subplugin.gradle.kts @@ -31,11 +31,29 @@ sourceSets { configurations { runtimeClasspath { - // IDE provides Kotlin + // Exclude dependencies that ship with IDE + exclude(group = "org.slf4j") exclude(group = "org.jetbrains.kotlin") exclude(group = "org.jetbrains.kotlinx") } + listOf( + "testRuntimeClasspath", + "integrationTestRuntimeClasspath", + ).forEach { + try { + it { + // Exclude dependencies that ship with IDE + exclude(group = "org.slf4j") + // we want kotlinx-coroutines-debug and kotlinx-coroutines-test + exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm") + exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core") + } + } catch (e: Exception){ + logger.info("Skipped excluding IDE deps for $it because hit $e") + } + } + configureEach { // IDE provides netty exclude("io.netty") @@ -44,12 +62,6 @@ configurations { return@configureEach } - // Exclude dependencies that ship with iDE - exclude(group = "org.slf4j") - // we want kotlinx-coroutines-debug and kotlinx-coroutines-test - exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm") - exclude(group = "org.jetbrains.kotlinx", "kotlinx-coroutines-core") - resolutionStrategy.eachDependency { if (requested.group == "org.jetbrains.kotlinx" && requested.name.startsWith("kotlinx-coroutines")) { useVersion(versionCatalog.findVersion("kotlinCoroutines").get().toString()) diff --git a/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts b/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts index 0dabd5e83ec..fb1f0dbf15e 100644 --- a/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/toolkit-kotlin-conventions.gradle.kts @@ -1,11 +1,11 @@ +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + import io.gitlab.arturbosch.detekt.Detekt import io.gitlab.arturbosch.detekt.DetektCreateBaselineTask import io.gitlab.arturbosch.detekt.DetektPlugin import org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension -// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - plugins { id("java-library") id("toolkit-detekt") @@ -15,12 +15,6 @@ plugins { // TODO: https://github.com/gradle/gradle/issues/15383 val versionCatalog = extensions.getByType().named("libs") dependencies { - // kotlin/kotlin-coroutines might not be necessary if we're in an intellij-plugin-based module - // - The dependency on the Kotlin Standard Library (stdlib) is automatically added when using the Gradle Kotlin plugin and may conflict with the version provided with the IntelliJ Platform, see: https://jb.gg/intellij-platform-kotlin-stdlib - //- The Kotlin Coroutines library should not be added explicitly to the project as it is already provided with the IntelliJ Platform. - implementation(versionCatalog.findBundle("kotlin").get()) - implementation(versionCatalog.findLibrary("kotlin-coroutines").get()) - testFixturesApi(versionCatalog.findLibrary("kotlin-test").get()) testFixturesApi(versionCatalog.findLibrary("kotlin-coroutinesDebug").get()) { // IDE provides JNA and results in conflicts diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index c4cc2f47aea..db13913d3b2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -97,7 +97,7 @@ kotlin-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", kotlin-coroutinesDebug = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-debug", version.ref = "kotlinCoroutines" } kotlin-coroutinesTest = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinCoroutines" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } -kotlin-stdLibJdk8 = { module = "org.jetbrains.kotlin:kotlin-stdlib-jdk8", version.ref = "kotlin" } +kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" } mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } mockito-kotlin = { module = "org.mockito.kotlin:mockito-kotlin", version.ref = "mockitoKotlin" } @@ -114,7 +114,7 @@ zjsonpatch = { module = "com.flipkart.zjsonpatch:zjsonpatch", version.ref = "zjs [bundles] jackson = ["jackson-datetime", "jackson-kotlin", "jackson-yaml", "jackson-xml"] -kotlin = ["kotlin-stdLibJdk8", "kotlin-reflect"] +kotlin = ["kotlin-stdlib", "kotlin-reflect"] mockito = ["mockito-core", "mockito-kotlin"] sshd = ["sshd-core", "sshd-scp", "sshd-sftp"] diff --git a/kotlinResolution.settings.gradle.kts b/kotlinResolution.settings.gradle.kts index ad70ad89c77..30e04b0a6cd 100644 --- a/kotlinResolution.settings.gradle.kts +++ b/kotlinResolution.settings.gradle.kts @@ -12,7 +12,7 @@ dependencyResolutionManagement { } "2024.2" -> { - "1.8.0" + "1.8.0-intellij-9" } else -> { error("not set") } diff --git a/plugins/core/core/build.gradle.kts b/plugins/core/core/build.gradle.kts index 32464f6cb60..e7eda1fd52b 100644 --- a/plugins/core/core/build.gradle.kts +++ b/plugins/core/core/build.gradle.kts @@ -9,6 +9,10 @@ plugins { } dependencies { + // provided at runtime by IDE + compileOnly(libs.bundles.kotlin) + compileOnly(libs.kotlin.coroutines) + compileOnlyApi(project(":plugin-core:resources")) compileOnlyApi(project(":plugin-core:sdk-codegen")) diff --git a/plugins/core/resources/build.gradle.kts b/plugins/core/resources/build.gradle.kts index 19e00ac3308..16ff2cf4c97 100644 --- a/plugins/core/resources/build.gradle.kts +++ b/plugins/core/resources/build.gradle.kts @@ -17,6 +17,8 @@ sourceSets { } dependencies { + implementation(libs.bundles.kotlin) + testImplementation(libs.junit4) testRuntimeOnly(libs.junit5.jupiterVintage) } diff --git a/plugins/toolkit/jetbrains-rider/build.gradle.kts b/plugins/toolkit/jetbrains-rider/build.gradle.kts index 6381e62bec0..e64469e8811 100644 --- a/plugins/toolkit/jetbrains-rider/build.gradle.kts +++ b/plugins/toolkit/jetbrains-rider/build.gradle.kts @@ -347,14 +347,3 @@ tasks.integrationTest { tasks.withType().configureEach { dependsOn(generateModels) } - -configurations.all { - if (name.contains("detekt")) { - return@all - } - - // test runner not happy with coroutines, but not clear where it's coming from: - // java.lang.Throwable: Thread context was already set: InstalledThreadContext(snapshot=null, context=EmptyCoroutineContext). - // Most likely, you are using 'runBlocking' instead of 'runBlockingCancellable' somewhere in the asynchronous stack. - exclude("org.jetbrains.kotlinx") -} From 115ed3b7a970e311fb598c62ce69881b1501dc02 Mon Sep 17 00:00:00 2001 From: Richard Li Date: Wed, 11 Sep 2024 13:51:18 -0700 Subject: [PATCH 3/3] conflict --- plugins/toolkit/jetbrains-core/build.gradle.kts | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/toolkit/jetbrains-core/build.gradle.kts b/plugins/toolkit/jetbrains-core/build.gradle.kts index 63787612467..8549397d8de 100644 --- a/plugins/toolkit/jetbrains-core/build.gradle.kts +++ b/plugins/toolkit/jetbrains-core/build.gradle.kts @@ -185,8 +185,6 @@ dependencies { compileOnlyApi(project(":plugin-core:core")) compileOnlyApi(project(":plugin-core:jetbrains-community")) - // TODO: remove Q dependency when split is fully done - implementation(libs.bundles.jackson) implementation(libs.zjsonpatch) testFixturesApi(testFixtures(project(":plugin-core:jetbrains-community")))