Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies

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

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
This commit is contained in:
Nikita Bobko
2022-07-25 13:04:39 +02:00
parent 6eb3f1ac05
commit 8f79e833a8
48 changed files with 0 additions and 77 deletions
@@ -12,7 +12,6 @@ dependencies {
implementation(project(":analysis:analysis-api"))
implementation(project(":kotlin-reflect"))
implementation(project(":kotlin-reflect-api"))
/*
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
@@ -41,7 +41,6 @@ dependencies {
testApi(projectTests(":analysis:analysis-api-impl-base"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testApiJUnit5()
testApi(project(":kotlin-reflect"))
testImplementation(project(":analysis:symbol-light-classes"))
testRuntimeOnly(project(":core:descriptors.runtime"))
-1
View File
@@ -16,7 +16,6 @@ dependencies {
testApi(project(":compiler:frontend.java"))
testApi(kotlinStdlib())
testApi(project(":kotlin-reflect"))
testApi(projectTests(":compiler:tests-common"))
testApi(commonDependency("junit:junit"))
testApi(projectTests(":compiler:test-infrastructure"))
-1
View File
@@ -30,7 +30,6 @@ dependencies {
testApi(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward
testApi(project(":kotlin-scripting-compiler"))
testApi(project(":kotlin-script-util"))
testCompileOnly(project(":kotlin-reflect-api"))
otherCompilerModules.forEach {
testCompileOnly(project(it))
@@ -24,7 +24,6 @@ dependencies {
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:cli-common"))
compileOnly(project(":daemon-common-new"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(project(":kotlin-daemon-client"))
compileOnly(project(":js:js.frontend"))
compileOnly(project(":daemon-common")) { isTransitive = false }
@@ -22,7 +22,6 @@ dependencies {
compileOnly(project(":compiler:util"))
compileOnly(project(":compiler:cli-common"))
compileOnly(project(":daemon-common"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(project(":js:js.frontend"))
compileOnly(commonDependency("net.rubygrapefruit", "native-platform"))
@@ -31,7 +30,6 @@ dependencies {
nativePlatformVariants.forEach {
embedded(commonDependency("net.rubygrapefruit", "native-platform", "-$it"))
}
runtimeOnly(project(":kotlin-reflect"))
api(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) {
isTransitive = false
}
@@ -27,8 +27,6 @@ dependencies {
testApiJUnit5()
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir2ir:jvm-backend"))
@@ -10,7 +10,6 @@ dependencies {
implementation(project(":compiler:fir:tree:tree-generator"))
implementation(project(":compiler:resolution.common"))
implementation(project(":kotlin-reflect"))
implementation(project(":kotlin-reflect-api"))
/*
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,6 @@ dependencies {
implementation(project(":compiler:frontend"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCore())
}
@@ -16,7 +16,6 @@ dependencies {
implementation(project(":compiler:frontend"))
implementation(project(":compiler:psi"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCore())
}
-1
View File
@@ -25,7 +25,6 @@ dependencies {
implementation(project(":compiler:ir.serialization.jvm"))
implementation(project(":compiler:ir.tree"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCore())
}
-2
View File
@@ -31,8 +31,6 @@ dependencies {
testApiJUnit5()
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:deserialization"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":core:descriptors.jvm"))
@@ -23,8 +23,6 @@ dependencies {
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testApi(projectTests(":compiler:tests-common"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApi(projectTests(":compiler:fir:analysis-tests:legacy-fir-tests"))
testApi(project(":compiler:fir:resolve"))
-1
View File
@@ -10,7 +10,6 @@ dependencies {
api(project(":compiler:fir:tree"))
implementation(project(":core:util.runtime"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(commonDependency("com.google.guava:guava"))
}
@@ -28,9 +28,7 @@ dependencies {
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testCompileOnly(intellijCore())
-1
View File
@@ -8,7 +8,6 @@ dependencies {
api(project(":compiler:fir:semantics"))
implementation(project(":core:util.runtime"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(commonDependency("com.google.guava:guava"))
}
-1
View File
@@ -7,7 +7,6 @@ dependencies {
api(project(":compiler:fir:providers"))
implementation(project(":core:util.runtime"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(commonDependency("com.google.guava:guava"))
}
@@ -9,7 +9,6 @@ dependencies {
api(project(":js:js.frontend"))
implementation(project(":compiler:ir.backend.common"))
compileOnly(project(":kotlin-reflect-api"))
compileOnly(intellijCore())
}
@@ -8,8 +8,6 @@ dependencies {
testApi(project(":compiler:cli"))
testApi(intellijCore())
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testImplementation(projectTests(":compiler:test-infrastructure-utils"))
@@ -13,8 +13,6 @@ dependencies {
testImplementation(project(":compiler:backend.jvm.lower"))
testImplementation(intellijCore())
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testImplementation(projectTests(":generators:test-generator"))
@@ -13,7 +13,6 @@ dependencies {
testApiJUnit5(vintageEngine = true, runner = true, suiteApi = true)
testImplementation(intellijCore())
testRuntimeOnly(project(":kotlin-reflect"))
}
sourceSets {
@@ -18,8 +18,6 @@ dependencies {
testImplementation(projectTests(":compiler:visualizer"))
testImplementation(projectTests(":js:js.tests"))
testImplementation(projectTests(":generators:test-generator"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
}
sourceSets {
-5
View File
@@ -8,12 +8,7 @@ dependencies {
testApi(projectTests(":compiler:tests-common"))
testImplementation(intellijCore())
testApi(projectTests(":generators:test-generator"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(toolsJar())
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
}
}
sourceSets {
-5
View File
@@ -15,11 +15,6 @@ dependencies {
api("org.jsoup:jsoup:1.14.2")
if (kotlinBuildProperties.isInJpsBuildIdeaSync) {
testRuntimeOnly(files("${rootProject.projectDir}/dist/kotlinc/lib/kotlin-reflect.jar"))
}
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApiJUnit5(vintageEngine = true)
-1
View File
@@ -71,7 +71,6 @@ dependencies {
testApi(projectTests(":plugins:fir-plugin-prototype"))
testApi(projectTests(":plugins:fir-plugin-prototype:fir-plugin-ic-test"))
testApi(projectTests(":generators:test-generator"))
testCompileOnly(project(":kotlin-reflect-api"))
testImplementation(project(":kotlin-reflect"))
testImplementation(projectTests(":compiler:test-infrastructure-utils"))
testImplementation(projectTests(":compiler:test-infrastructure"))
-1
View File
@@ -22,7 +22,6 @@ dependencies {
testImplementation(project(":compiler:cli-common"))
testImplementation(jpsModelSerialization())
testImplementation(project(":kotlin-reflect"))
testImplementation(commonDependency("junit:junit"))
}
-1
View File
@@ -53,7 +53,6 @@ dependencies {
testRuntimeOnly("com.jetbrains.intellij.platform:util-ex:$intellijVersion") { isTransitive = false }
testRuntimeOnly("com.google.code.gson:gson:2.8.9")
testCompileOnly(project(":kotlin-reflect-api"))
testImplementation(projectTests(":compiler:incremental-compilation-impl"))
testCompileOnly(jpsBuild())
testImplementation(devKitJps()) {
-3
View File
@@ -59,8 +59,6 @@ dependencies {
testApi(project(":compiler:cli"))
testApi(project(":compiler:util"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:trove4j"))
testRuntimeOnly(commonDependency("com.google.guava:guava"))
testRuntimeOnly(commonDependency("org.jetbrains.intellij.deps:jdom"))
@@ -70,7 +68,6 @@ dependencies {
if (!kotlinBuildProperties.isInJpsBuildIdeaSync) {
testJsRuntime(project(":kotlin-test:kotlin-test-js")) // to be sure that kotlin-test-js built before tests runned
}
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":kotlin-preloader")) // it's required for ant tests
testRuntimeOnly(project(":compiler:backend-common"))
testRuntimeOnly(commonDependency("org.fusesource.jansi", "jansi"))
@@ -27,7 +27,6 @@ dependencies {
testApi(project(":kotlin-compiler-embeddable"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testRuntimeOnly(project(":kotlin-reflect"))
compilerClasspath(project(":kotlin-reflect"))
compilerClasspath(kotlinStdlib())
compilerClasspath(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
@@ -19,7 +19,6 @@ dependencies {
runtimeOnly(project(":kotlin-scripting-compiler-embeddable"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testApi(commonDependency("junit:junit"))
testRuntimeOnly(project(":kotlin-reflect"))
compileOnly(project(":compiler:cli-common")) // TODO: fix import (workaround for jps build)
testCompileOnly(project(":core:util.runtime")) // TODO: fix import (workaround for jps build)
testCompileOnly(project(":daemon-common")) // TODO: fix import (workaround for jps build)
@@ -9,7 +9,6 @@ dependencies {
testRuntimeOnly(project(":kotlin-compiler-embeddable"))
testRuntimeOnly(project(":kotlin-scripting-compiler-embeddable"))
testRuntimeOnly(project(":kotlin-scripting-jvm-host"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(commonDependency("com.google.guava:guava"))
testApi(commonDependency("junit"))
}
@@ -7,11 +7,9 @@ dependencies {
api(project(":examples:scripting-jvm-maven-deps"))
api(project(":kotlin-scripting-jvm-host-unshaded"))
api(kotlinStdlib())
compileOnly(project(":kotlin-reflect-api"))
compileOnly(project(":compiler:util"))
testRuntimeOnly(project(":kotlin-compiler"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":kotlin-scripting-compiler"))
testApi(commonDependency("junit"))
@@ -9,7 +9,6 @@ dependencies {
api(project(":kotlin-script-util"))
testRuntimeOnly(project(":kotlin-compiler"))
testRuntimeOnly(project(":kotlin-scripting-compiler"))
testRuntimeOnly(project(":kotlin-reflect"))
testApi(commonDependency("junit"))
}
@@ -27,7 +27,6 @@ dependencies {
testRuntimeOnly(project(":kotlin-scripting-jsr223-unshaded"))
testRuntimeOnly(project(":kotlin-compiler"))
testRuntimeOnly(project(":kotlin-reflect"))
embeddableTestRuntime(commonDependency("junit"))
embeddableTestRuntime(project(":kotlin-scripting-jsr223"))
@@ -64,7 +64,6 @@ dependencies {
testImplementation(project(path = ":examples:annotation-processor-example"))
testImplementation(kotlinStdlib("jdk8"))
testImplementation(project(":kotlin-reflect"))
testImplementation(project(":kotlin-android-extensions"))
testImplementation(project(":kotlin-parcelize-compiler"))
testImplementation(commonDependency("org.jetbrains.intellij.deps", "trove4j"))
@@ -39,7 +39,6 @@ dependencies {
commonCompileOnly(project(":compiler:incremental-compilation-impl"))
commonCompileOnly(project(":daemon-common"))
commonCompileOnly(project(":native:kotlin-native-utils"))
commonCompileOnly(project(":kotlin-reflect-api"))
commonCompileOnly(project(":kotlin-android-extensions"))
commonCompileOnly(project(":kotlin-build-common"))
commonCompileOnly(project(":kotlin-compiler-runner"))
@@ -53,7 +52,6 @@ dependencies {
commonCompileOnly("com.android.tools.build:builder:3.6.4")
commonCompileOnly("com.android.tools.build:builder-model:3.6.4")
commonCompileOnly("org.codehaus.groovy:groovy-all:2.4.12")
commonCompileOnly(project(":kotlin-reflect"))
commonCompileOnly(intellijCore())
commonCompileOnly(commonDependency("org.jetbrains.teamcity:serviceMessages"))
commonCompileOnly("com.gradle:gradle-enterprise-gradle-plugin:3.9")
@@ -101,7 +99,6 @@ dependencies {
}
testCompileOnly(project(":compiler"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompileOnly(project(":kotlin-annotation-processing"))
testCompileOnly(project(":kotlin-annotation-processing-gradle"))
@@ -20,7 +20,6 @@ dependencies {
compileOnly("org.apache.maven:maven-core:3.0.3")
testCompileOnly(project(":compiler:cli"))
testApi(project(":kotlin-test:kotlin-test-junit"))
testImplementation(project(":kotlin-reflect"))
testApi(commonDependency("junit:junit"))
testApi(project(":kotlin-scripting-compiler"))
testRuntimeOnly(project(":kotlin-compiler"))
-1
View File
@@ -10,7 +10,6 @@ dependencies {
api(project(":kotlin-util-io"))
testImplementation(commonDependency("junit:junit"))
testCompileOnly(project(":kotlin-reflect-api"))
testImplementation(project(":kotlin-reflect"))
}
-2
View File
@@ -28,8 +28,6 @@ dependencies {
testImplementation(project(":compiler:fir:checkers"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
}
@@ -69,7 +69,6 @@ dependencies {
testApi(project(":kotlin-test:kotlin-test-jvm"))
testRuntimeOnly(kotlinStdlib())
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":kotlin-preloader")) // it's required for ant tests
testRuntimeOnly(project(":compiler:backend-common"))
testRuntimeOnly(commonDependency("org.fusesource.jansi", "jansi"))
@@ -16,7 +16,6 @@ dependencies {
compileOnly(project(":compiler:fir:entrypoint"))
compileOnly(project(":compiler:plugin-api"))
compileOnly(intellijCore())
compileOnly(project(":kotlin-reflect-api"))
testApiJUnit5()
testApi(projectTests(":compiler:tests-common-new"))
@@ -26,8 +25,6 @@ dependencies {
testApi(project(":compiler:fir:checkers:checkers.jvm"))
testApi(project(":compiler:fir:checkers:checkers.js"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
@@ -11,9 +11,7 @@ dependencies {
testApi(projectTests(":compiler:incremental-compilation-impl"))
testCompileOnly(intellijCore())
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
-2
View File
@@ -34,8 +34,6 @@ dependencies {
testApi(project(":compiler:fir:checkers:checkers.jvm"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApi(commonDependency("junit:junit"))
-2
View File
@@ -21,8 +21,6 @@ dependencies {
testApi(projectTests(":compiler:test-infrastructure"))
testApi(projectTests(":compiler:test-infrastructure-utils"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
@@ -43,8 +43,6 @@ dependencies {
testApi(project(":compiler:fir:checkers:checkers.js"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testApi(commonDependency("junit:junit"))
@@ -17,7 +17,6 @@ dependencies {
compileOnly(project(":compiler:ir.backend.common"))
compileOnly(project(":compiler:ir.tree"))
compileOnly(project(":compiler:fir:entrypoint"))
compileOnly(project(":kotlin-reflect-api"))
}
sourceSets {
@@ -26,8 +26,6 @@ dependencies {
testImplementation(projectTests(":compiler:tests-common"))
testImplementation(commonDependency("junit:junit"))
testCompileOnly(project(":kotlin-reflect-api"))
testRuntimeOnly(project(":kotlin-reflect"))
testRuntimeOnly(project(":core:descriptors.runtime"))
testRuntimeOnly(project(":compiler:fir:fir-serialization"))
@@ -13,7 +13,6 @@ dependencies {
compileOnly(project(":compiler:backend.js"))
compileOnly(project(":core:descriptors.runtime"))
compileOnly(project(":compiler:ir.tree"))
compileOnly(project(":kotlin-reflect-api"))
api(project(":kotlin-scripting-common"))
api(project(":kotlin-scripting-js"))
api(project(":kotlin-util-klib"))