2/5 Replace source dependency on kotlin-reflect with binary dependency

Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
This commit is contained in:
Nikita Bobko
2022-07-19 14:52:49 +02:00
parent 276923834f
commit 2a4f3f41aa
41 changed files with 52 additions and 49 deletions
@@ -11,7 +11,7 @@ dependencies {
implementation(project(":compiler:fir:checkers:checkers-component-generator"))
implementation(project(":analysis:analysis-api"))
implementation(project(":kotlin-reflect"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
/*
We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCore
@@ -24,7 +24,7 @@ dependencies {
testApi(project(":analysis:decompiled:decompiler-to-file-stubs"))
testApi(project(":analysis:decompiled:decompiler-to-psi"))
testApi(projectTests(":analysis:analysis-test-framework"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(toolsJar())
}
+1 -1
View File
@@ -9,7 +9,7 @@ kotlin {
dependencies {
implementation(kotlinxCollectionsImmutable())
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(project(":compiler:psi"))
compileOnly(project(":compiler:frontend"))
+2 -2
View File
@@ -14,7 +14,7 @@ dependencies {
compileOnly(project(":js:js.serializer"))
compileOnly(project(":js:js.config"))
compileOnly(project(":kotlin-util-klib-metadata"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))
@@ -25,7 +25,7 @@ dependencies {
testApi(commonDependency("junit:junit"))
testApi(protobufFull())
testApi(kotlinStdlib())
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
sourceSets {
+1 -1
View File
@@ -35,7 +35,7 @@ dependencies {
testCompileOnly(project(it))
}
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(toolsJar())
antLauncherJar(commonDependency("org.apache.ant", "ant"))
+1 -1
View File
@@ -10,7 +10,7 @@ dependencies {
api(project(":js:js.config"))
api(project(":native:kotlin-native-utils"))
api(project(":compiler:plugin-api"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
compileOnly(commonDependency("com.google.guava:guava"))
compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))
+1 -1
View File
@@ -16,7 +16,7 @@ dependencies {
compileOnly(intellijCore())
compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j"))
runtimeOnly(project(":kotlin-reflect"))
runtimeOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
embedded(project(":daemon-common")) { isTransitive = false }
api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) {
@@ -23,7 +23,7 @@ dependencies {
testApi(project(":compiler:fir:entrypoint"))
testApi(project(":compiler:frontend"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(project(":core:descriptors.runtime"))
testCompileOnly(intellijCore())
+1 -1
View File
@@ -13,7 +13,7 @@ dependencies {
implementation(project(":compiler:frontend.common-psi"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
}
@@ -9,7 +9,7 @@ dependencies {
implementation(project(":compiler:fir:tree"))
implementation(project(":compiler:fir:tree:tree-generator"))
implementation(project(":compiler:resolution.common"))
implementation(project(":kotlin-reflect"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
/*
We do not need guava in the generator, but because of a bug in the IJ project importing, we need to have a dependency on intellijCore
@@ -15,7 +15,7 @@ dependencies {
implementation(project(":compiler:frontend"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
}
@@ -20,7 +20,7 @@ dependencies {
testImplementation(commonDependency("junit:junit"))
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
@@ -30,7 +30,7 @@ dependencies {
testApi(commonDependency("org.jetbrains.intellij.deps:jdom"))
testImplementation(commonDependency("com.google.code.gson:gson"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(project(":core:descriptors.runtime"))
}
+1 -1
View File
@@ -5,7 +5,7 @@ plugins {
dependencies {
compileOnly(project(":compiler:ir.tree"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
sourceSets {
@@ -10,7 +10,7 @@ dependencies {
api(project(":kotlin-util-klib-metadata"))
api(project(":compiler:util"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
compileOnly(commonDependency("org.jetbrains.intellij.deps:trove4j"))
@@ -7,7 +7,7 @@ dependencies {
testImplementation(project(":compiler:fir:entrypoint"))
testImplementation(project(":compiler:cli"))
testImplementation(intellijCore())
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(project(":core:descriptors.runtime"))
+1 -1
View File
@@ -56,7 +56,7 @@ dependencies {
testApi(projectTests(":compiler:test-infrastructure-utils"))
testApi(commonDependency("junit:junit"))
testApi(commonDependency("com.android.tools:r8"))
testCompileOnly(project(":kotlin-reflect"))
testCompileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testCompileOnly(toolsJar())
testCompileOnly(intellijCore())
+1 -1
View File
@@ -71,7 +71,7 @@ dependencies {
testApi(projectTests(":plugins:fir-plugin-prototype"))
testApi(projectTests(":plugins:fir-plugin-prototype:fir-plugin-ic-test"))
testApi(projectTests(":generators:test-generator"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(projectTests(":compiler:test-infrastructure-utils"))
testImplementation(projectTests(":compiler:test-infrastructure"))
testImplementation(projectTests(":compiler:tests-common-new"))
+1 -1
View File
@@ -12,7 +12,7 @@ dependencies {
testApiJUnit5()
testApi(project(":generators"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(project(":core:descriptors.runtime"))
}
@@ -66,7 +66,7 @@ native {
dependencies {
implementation(project(":kotlin-native:utilities:basic-utils"))
implementation(project(":kotlin-stdlib"))
implementation(project(":kotlin-reflect"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
sourceSets.main.get().java.srcDir("src/jvm/kotlin")
+3 -1
View File
@@ -107,7 +107,9 @@ dependencies {
trove4j_jar "org.jetbrains.intellij.deps:trove4j:1.0.20181211@jar"
kotlin_compiler_jar project(kotlinCompilerModule)
kotlin_stdlib_jar kotlinStdLibModule
kotlin_reflect_jar project(":kotlin-reflect")
use(DependenciesKt) {
kotlin_reflect_jar commonDependency("org.jetbrains.kotlin:kotlin-reflect")
}
kotlin_script_runtime_jar project(":kotlin-script-runtime")
compilerApi project(":kotlin-native:utilities:basic-utils")
+1 -1
View File
@@ -60,7 +60,7 @@ dependencies {
commonApi(project(":kotlin-gradle-plugin"))
commonApi(project(":kotlin-gradle-plugin-api"))
commonApi(project(":kotlin-gradle-plugin-model"))
implementation(project(":kotlin-reflect"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
implementation("org.jetbrains.kotlin:kotlin-build-gradle-plugin:${kotlinBuildProperties.buildGradlePluginVersion}")
implementation("com.ullink.slack:simpleslackapi:$slackApiVersion") {
+1 -1
View File
@@ -52,7 +52,7 @@ dependencies {
kotlinCompilerClasspath("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
implementation(kotlinStdlib())
implementation(project(":kotlin-reflect"))
implementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
api("org.jetbrains.kotlin:kotlin-native-utils:$kotlinVersion")
api("org.jetbrains.kotlin:kotlin-util-klib:$kotlinVersion")
}
@@ -27,7 +27,7 @@ dependencies {
testApi(project(":kotlin-compiler-embeddable"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-test:kotlin-test-junit"))
compilerClasspath(project(":kotlin-reflect"))
compilerClasspath(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compilerClasspath(kotlinStdlib())
compilerClasspath(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
compilerClasspath(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
@@ -41,7 +41,7 @@ dependencies {
testImplementation(project(":kotlin-test:kotlin-test-junit"))
testImplementation(commonDependency("junit:junit"))
testImplementation(commonDependency("org.jetbrains.intellij.deps:asm-all"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
if (deployVersion != null) {
+1 -1
View File
@@ -7,7 +7,7 @@ project.updateJvmTarget("1.8")
dependencies {
api(kotlinStdlib())
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testApi(commonDependency("junit"))
}
@@ -19,7 +19,7 @@ dependencies {
testImplementation(projectTests(":kotlin-scripting-dependencies"))
testImplementation(commonDependency("junit"))
testRuntimeOnly("org.slf4j:slf4j-nop:1.7.36")
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
}
+2 -2
View File
@@ -13,10 +13,10 @@ dependencies {
api(project(":kotlin-scripting-jvm-host-unshaded"))
api(project(":kotlin-scripting-compiler"))
compileOnly(project(":compiler:cli-common"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
publishedRuntime(project(":kotlin-compiler"))
publishedRuntime(project(":kotlin-reflect"))
publishedRuntime(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
sourceSets {
@@ -21,7 +21,7 @@ dependencies {
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
testRuntimeOnly(project(":kotlin-compiler"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
embeddableTestRuntime(project(":kotlin-scripting-jvm-host"))
@@ -13,11 +13,11 @@ dependencies {
api(project(":kotlin-scripting-jvm"))
compileOnly(project(":kotlin-scripting-compiler"))
compileOnly(project(":compiler:cli"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
publishedRuntime(project(":kotlin-compiler"))
publishedRuntime(project(":kotlin-scripting-compiler"))
publishedRuntime(project(":kotlin-reflect"))
publishedRuntime(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
publishedRuntime(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
}
@@ -32,7 +32,7 @@ dependencies {
compileOnly(project(":kotlin-scripting-dependencies-maven"))
runtimeOnly(project(":kotlin-scripting-compiler-embeddable"))
runtimeOnly(kotlinStdlib())
runtimeOnly(project(":kotlin-reflect"))
runtimeOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
embedded(project(":kotlin-scripting-common")) { isTransitive = false }
embedded(project(":kotlin-scripting-jvm")) { isTransitive = false }
embedded(project(":kotlin-scripting-jvm-host-unshaded")) { isTransitive = false }
@@ -46,7 +46,7 @@ dependencies {
}
proguardLibraryJars(kotlinStdlib())
proguardLibraryJars(project(":kotlin-reflect"))
proguardLibraryJars(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
proguardLibraryJars(project(":kotlin-compiler"))
relocatedJarContents(embedded)
@@ -11,8 +11,8 @@ dependencies {
testApi(testFixtures(project(":kotlin-project-model")))
testApi(project(":kotlin-project-model"))
testApi(projectTests(":kotlin-gradle-plugin-integration-tests"))
testCompileOnly(project(":kotlin-reflect"))
testImplementation(project(":kotlin-reflect"))
testCompileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(projectTests(":compiler:test-infrastructure-utils"))
testImplementation(projectTests(":compiler:test-infrastructure"))
testImplementation(projectTests(":compiler:tests-common-new"))
@@ -17,7 +17,7 @@ dependencies {
testFixturesImplementation(project(":kotlin-tooling-core"))
testFixturesImplementation(project(":core:util.runtime"))
testFixturesImplementation(projectTests(":generators:test-generator"))
testFixturesImplementation(project(":kotlin-reflect"))
testFixturesImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
projectTest(jUnitMode = JUnitMode.JUnit5) {
+1 -1
View File
@@ -9,7 +9,7 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_11)
dependencies {
testImplementation(kotlinStdlib())
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(intellijCore())
testImplementation(commonDependency("commons-lang:commons-lang"))
testImplementation(commonDependency("org.jetbrains.teamcity:serviceMessages"))
+2 -1
View File
@@ -10,7 +10,8 @@ dependencies {
api(project(":kotlin-util-io"))
testImplementation(commonDependency("junit:junit"))
testImplementation(project(":kotlin-reflect"))
testImplementation(kotlinStdlib())
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
sourceSets {
@@ -16,14 +16,14 @@ dependencies {
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-jvm"))
api(kotlinStdlib())
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
compileOnly(commonDependency("org.jetbrains.intellij.deps:asm-all"))
// FIXME: drop after removing references to LocalFileSystem they don't exist in intellij-core
compileOnly(intellijAnalysis())
runtimeOnly(project(":kotlin-reflect"))
runtimeOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testApi(project(":compiler:frontend"))
testApi(project(":compiler:plugin-api"))
@@ -14,7 +14,7 @@ dependencies {
compileOnly(project(":core:descriptors.runtime"))
compileOnly(project(":compiler:ir.tree"))
compileOnly(project(":compiler:backend.jvm.entrypoint"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-jvm"))
api(project(":kotlin-scripting-compiler-impl"))
@@ -33,7 +33,7 @@ dependencies {
testImplementation(intellijCore())
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
}
optInToExperimentalCompilerApi()
@@ -28,7 +28,7 @@ dependencies {
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core-jvm"))
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
testImplementation(project(":analysis:decompiled:decompiler-to-psi"))
testImplementation(project(":analysis:decompiled:decompiler-to-file-stubs"))
testImplementation(intellijCore())
@@ -18,11 +18,11 @@ dependencies {
api(project(":kotlin-scripting-jvm"))
compileOnly(project(":kotlin-scripting-compiler"))
compileOnly(project(":compiler:cli"))
compileOnly(project(":kotlin-reflect"))
compileOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
compileOnly(intellijCore())
publishedRuntime(project(":kotlin-compiler"))
publishedRuntime(project(":kotlin-scripting-compiler"))
publishedRuntime(project(":kotlin-reflect"))
publishedRuntime(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
publishedRuntime(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
}
+1 -1
View File
@@ -24,7 +24,7 @@ val testCompilerClasspath by configurations.creating {
dependencies {
runtimeOnly(kotlinStdlib())
runtimeOnly(project(":kotlin-script-runtime"))
runtimeOnly(project(":kotlin-reflect"))
runtimeOnly(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
runtimeOnly(project(":kotlin-daemon-embeddable"))
runtimeOnly(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
Platform[203].orHigher {
+1 -1
View File
@@ -137,7 +137,7 @@ configurations.all {
dependencies {
api(kotlinStdlib())
api(project(":kotlin-script-runtime"))
api(project(":kotlin-reflect"))
api(commonDependency("org.jetbrains.kotlin:kotlin-reflect")) { isTransitive = false }
api(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
proguardLibraries(project(":kotlin-annotations-jvm"))