Build: Make all compile dependencies on toolsJar compileOnly

tools.jar differs between different versions of JDK reducing cache reuse
so better to not leak it to other modules
This commit is contained in:
Vyacheslav Gerasimov
2020-02-05 20:31:54 +03:00
parent 8e0f403f02
commit 0db69cadb6
21 changed files with 34 additions and 10 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ dependencies {
compile(project(":kotlin-util-io"))
compile(project(":compiler:ir.serialization.common"))
compile(toolsJar())
compileOnly(toolsJar())
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
compileOnly(intellijDep()) { includeIntellijCoreJarDependencies(project) }
+2 -1
View File
@@ -38,11 +38,12 @@ dependencies {
testCompileOnly(project(":plugins:android-extensions-compiler"))
testCompile(project(":kotlin-test:kotlin-test-jvm"))
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(project(":kotlin-scripting-compiler-impl"))
testCompile(commonDep("junit:junit"))
testCompile(androidDxJar()) { isTransitive = false }
testCompile(commonDep("com.android.tools:r8"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompileOnly(toolsJar())
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
Platform[193].orLower {
testCompile(intellijDep()) { includeJars("openapi", "picocontainer", rootProject = rootProject) }
+1
View File
@@ -11,6 +11,7 @@ dependencies {
testCompileOnly(intellijCoreDep()) { includeJars("intellij-core") }
testCompile(projectTests(":generators:test-generator"))
testRuntime(project(":kotlin-reflect"))
testRuntimeOnly(toolsJar())
testRuntime(intellijDep())
Platform[192].orHigher {
testRuntimeOnly(intellijPluginDep("java"))
+2 -1
View File
@@ -97,6 +97,7 @@ dependencies {
compileOnly(intellijPluginDep("java-i18n"))
compileOnly(intellijPluginDep("gradle"))
testCompileOnly(toolsJar())
testCompileOnly(project(":kotlin-reflect-api")) // TODO: fix import (workaround for jps build)
testCompile(project(":kotlin-test:kotlin-test-junit"))
testCompile(projectTests(":compiler:tests-common"))
@@ -109,8 +110,8 @@ dependencies {
testCompile(commonDep("junit:junit"))
testCompileOnly(intellijPluginDep("coverage"))
testRuntimeOnly(toolsJar())
testRuntime(project(":native:kotlin-native-utils")) { isTransitive = false }
testRuntime(commonDep("org.jetbrains", "markdown"))
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))
+1
View File
@@ -40,6 +40,7 @@ dependencies {
compileOnly(intellijPluginDep("java"))
}
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":idea:idea-android"))
+1
View File
@@ -53,6 +53,7 @@ dependencies {
testRuntime(project(":native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":idea:idea-new-project-wizard"))
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":idea:idea-android"))
+2
View File
@@ -9,6 +9,8 @@ dependencies {
compile(project(":compiler:light-classes"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:backend.jvm"))
compileOnly(toolsJar())
compileOnly(intellijDep())
compileOnly(commonDep("com.google.code.findbugs", "jsr305"))
+1
View File
@@ -45,6 +45,7 @@ dependencies {
testRuntime(project(":native:frontend.native")) { isTransitive = false }
testRuntime(project(":native:kotlin-native-utils")) { isTransitive = false }
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":idea:idea-android"))
+4 -1
View File
@@ -6,8 +6,11 @@ plugins {
dependencies {
compile(kotlinStdlib())
compile(project(":compiler:backend"))
compile(toolsJar())
compileOnly(toolsJar())
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "asm-all", rootProject = rootProject) }
testCompileOnly(toolsJar())
testCompile(project(":kotlin-test:kotlin-test-junit"))
testCompile(commonDep("junit:junit"))
testCompile(intellijDep()) { includeJars("asm-all", rootProject = rootProject) }
@@ -10,8 +10,8 @@ dependencies {
compile(project(":idea:idea-core"))
compile(project(":idea:ide-common"))
compile(project(":idea:jvm-debugger:jvm-debugger-util"))
compile(toolsJar())
compileOnly(toolsJar())
compileOnly(intellijDep())
Platform[192].orHigher {
@@ -6,6 +6,7 @@ plugins {
dependencies {
compile(project(":idea:jvm-debugger:jvm-debugger-core"))
compileOnly(toolsJar())
compileOnly(intellijDep())
Platform[192].orHigher {
@@ -9,7 +9,8 @@ dependencies {
compile(project(":idea:idea-core"))
compile(project(":idea:idea-j2k"))
compile(project(":idea:jvm-debugger:jvm-debugger-util"))
compile(toolsJar())
compileOnly(toolsJar())
Platform[192].orHigher {
compileOnly(intellijPluginDep("java"))
}
@@ -6,8 +6,8 @@ plugins {
dependencies {
compile(project(":compiler:backend"))
compile(project(":idea:ide-common"))
compile(toolsJar())
compileOnly(toolsJar())
compileOnly(intellijDep())
Platform[192].orHigher {
compileOnly(intellijPluginDep("java"))
@@ -11,8 +11,8 @@ dependencies {
// TODO: get rid of this
compile(project(":idea:jvm-debugger:eval4j"))
compile(toolsJar())
compileOnly(toolsJar())
Platform[192].orHigher {
compileOnly(intellijPluginDep("java"))
}
+1
View File
@@ -34,6 +34,7 @@ dependencies {
testRuntime(intellijPluginDep("java"))
}
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testCompileOnly(intellijDep())
+1
View File
@@ -32,6 +32,7 @@ dependencies {
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntimeOnly(toolsJar())
testRuntime(project(":native:frontend.native")) { isTransitive = false }
testRuntime(project(":native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":plugins:kapt3-idea")) { isTransitive = false }
+1
View File
@@ -48,6 +48,7 @@ dependencies {
testRuntimeOnly(intellijPluginDep("java"))
}
testRuntimeOnly(toolsJar())
testRuntime(project(":kotlin-reflect"))
testRuntime(project(":kotlin-script-runtime"))
}
+1
View File
@@ -35,6 +35,7 @@ dependencies {
testCompileOnly(intellijDep())
testRuntimeOnly(toolsJar())
testRuntime(project(":idea:idea-jvm"))
testRuntime(project(":sam-with-receiver-ide-plugin"))
testRuntime(project(":allopen-ide-plugin"))
+3 -1
View File
@@ -5,8 +5,10 @@ plugins {
dependencies {
compile(kotlinStdlib())
compile(toolsJar())
compileOnly(toolsJar())
testCompile(commonDep("junit:junit"))
testCompileOnly(toolsJar())
}
sourceSets {
@@ -26,6 +26,8 @@ dependencies {
compile(project(":compiler:frontend"))
compile(project(":compiler:frontend.java"))
compile(project(":compiler:plugin-api"))
compileOnly(toolsJar())
compileOnly(project(":kotlin-annotation-processing-cli"))
compileOnly(project(":kotlin-annotation-processing-base"))
compileOnly(project(":kotlin-annotation-processing-runtime"))
@@ -37,6 +39,8 @@ dependencies {
testCompile(projectTests(":kotlin-annotation-processing-base"))
testCompile(commonDep("junit:junit"))
testCompile(project(":kotlin-annotation-processing-runtime"))
testCompileOnly(toolsJar())
testRuntimeOnly(toolsJar())
embedded(project(":kotlin-annotation-processing-runtime")) { isTransitive = false }
embedded(project(":kotlin-annotation-processing-cli")) { isTransitive = false }
+1
View File
@@ -38,6 +38,7 @@ dependencies {
testCompile(project(":idea:idea-native")) { isTransitive = false }
testCompile(project(":idea:idea-gradle-native")) { isTransitive = false }
testRuntimeOnly(toolsJar())
testRuntime(project(":native:frontend.native")) { isTransitive = false }
testRuntime(project(":native:kotlin-native-utils")) { isTransitive = false }
testRuntime(project(":kotlin-reflect"))