Skip to content

Commit 5bde972

Browse files
committed
Build: Fix dependencies on :kotlin-compiler project
Dependencies on :kotlin-compiler should never be used in configurations which are imported transitively because ide fails to import it as project dependency. When :kotlin-compiler dependency is imported as kotlin-compiler.jar dependency ide re-indexes it on every change. This behaviour is super annoying. #KT-31120 Fixed
1 parent c398961 commit 5bde972

File tree

11 files changed

+23
-15
lines changed

11 files changed

+23
-15
lines changed

konan/library-reader/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ dependencies {
2222
compileOnly(project(":compiler:cli-common"))
2323

2424
// This dependency is necessary to keep the right dependency record inside of POM file:
25-
mavenCompileScope(projectRuntimeJar(":kotlin-compiler"))
25+
mavenCompileScope(project(":kotlin-compiler"))
2626

2727
compile(project(":kotlin-native:kotlin-native-utils"))
2828

libraries/examples/scripting/jvm-maven-deps/host/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ dependencies {
99
compile(kotlinStdlib())
1010
compileOnly(project(":kotlin-reflect-api"))
1111
compileOnly(project(":compiler:util"))
12-
runtime(project(":kotlin-reflect"))
1312

14-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
13+
testRuntimeOnly(project(":kotlin-compiler"))
14+
testRuntimeOnly(project(":kotlin-reflect"))
15+
testRuntimeOnly(project(":kotlin-scripting-compiler"))
16+
1517
testCompile(commonDep("junit"))
1618
}
1719

libraries/examples/scripting/jvm-simple-script/host/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ dependencies {
77
compile(project(":examples:scripting-jvm-simple-script"))
88
compile(project(":kotlin-scripting-jvm-host"))
99
compile(project(":kotlin-script-util"))
10-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
10+
testRuntimeOnly(project(":kotlin-compiler"))
11+
testRuntimeOnly(project(":kotlin-scripting-compiler"))
1112
testRuntimeOnly(project(":kotlin-reflect"))
1213
testCompile(commonDep("junit"))
1314
}

libraries/scripting/jsr223-test/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ dependencies {
1212
testCompileOnly(project(":kotlin-scripting-jvm-host"))
1313
testCompileOnly(project(":compiler:cli"))
1414
testCompileOnly(project(":core:util.runtime"))
15-
testRuntime(project(":kotlin-scripting-jsr223"))
15+
16+
testRuntimeOnly(project(":kotlin-scripting-jsr223"))
17+
testRuntimeOnly(project(":kotlin-compiler"))
18+
testRuntimeOnly(project(":kotlin-reflect"))
19+
1620
embeddableTestRuntime(commonDep("junit"))
1721
embeddableTestRuntime(project(":kotlin-scripting-jsr223-embeddable"))
1822
embeddableTestRuntime(testSourceSet.output)

libraries/scripting/jsr223/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ dependencies {
1515
compileOnly(project(":compiler:cli-common"))
1616
compileOnly(project(":kotlin-reflect-api"))
1717
compileOnly(intellijCoreDep())
18-
runtime(project(":kotlin-compiler"))
19-
runtime(project(":kotlin-reflect"))
2018
}
2119

2220
sourceSets {

libraries/scripting/jvm-host-test/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ dependencies {
1919
testCompile(project(":kotlin-scripting-jvm-host"))
2020
testCompile(projectTests(":compiler:tests-common"))
2121
testCompile(project(":daemon-common")) // TODO: fix import (workaround for jps build)
22+
23+
testRuntimeOnly(project(":kotlin-compiler"))
24+
testRuntimeOnly(project(":kotlin-scripting-compiler"))
25+
testRuntimeOnly(project(":kotlin-reflect"))
26+
testRuntimeOnly(commonDep("org.jetbrains.intellij.deps", "trove4j"))
27+
2228
embeddableTestRuntime(project(":kotlin-scripting-jvm-host-embeddable"))
2329
embeddableTestRuntime(project(":kotlin-test:kotlin-test-jvm"))
2430
embeddableTestRuntime(project(":kotlin-test:kotlin-test-junit"))

libraries/scripting/jvm-host/build.gradle.kts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ dependencies {
1414
compileOnly(project(":compiler:cli"))
1515
compileOnly(project(":kotlin-reflect-api"))
1616
compileOnly(intellijCoreDep())
17-
runtime(project(":kotlin-compiler"))
18-
runtime(project(":kotlin-scripting-compiler"))
19-
runtime(project(":kotlin-reflect"))
20-
runtime(commonDep("org.jetbrains.intellij.deps", "trove4j"))
2117
}
2218

2319
sourceSets {

libraries/tools/kotlin-script-util/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ dependencies {
2323
testRuntime(project(":kotlin-reflect"))
2424
testCompile(commonDep("junit:junit"))
2525
testCompile(project(":kotlin-scripting-compiler"))
26-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
26+
testRuntimeOnly(project(":kotlin-compiler"))
2727
testRuntime("org.jetbrains.kotlin:jcabi-aether:1.0-dev-3")
2828
testRuntime("org.sonatype.aether:aether-api:1.13.1")
2929
testRuntime("org.apache.maven:maven-core:3.0.3")

plugins/allopen/allopen-cli/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ dependencies {
1616
testRuntimeOnly(intellijDep()) {
1717
includeJars("guava", rootProject = rootProject)
1818
}
19-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
19+
20+
testRuntimeOnly(project(":kotlin-compiler"))
2021

2122
testCompile(project(":compiler:backend"))
2223
testCompile(project(":compiler:cli"))

plugins/noarg/noarg-cli/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencies {
1818
testRuntimeOnly(intellijDep()) {
1919
includeJars("guava", rootProject = rootProject)
2020
}
21-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
21+
testRuntimeOnly(project(":kotlin-compiler"))
2222
testCompile(project(":compiler:backend"))
2323
testCompile(project(":compiler:cli"))
2424
testCompile(projectTests(":compiler:tests-common"))

ultimate/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ dependencies {
8080

8181
testRuntime(project(":kotlin-reflect"))
8282
testRuntime(project(":kotlin-script-runtime"))
83-
testRuntimeOnly(projectRuntimeJar(":kotlin-compiler"))
83+
testRuntimeOnly(project(":kotlin-compiler"))
8484
testRuntime(project(":plugins:android-extensions-ide")) { isTransitive = false }
8585
testRuntime(project(":plugins:android-extensions-compiler")) { isTransitive = false }
8686
testRuntime(project(":plugins:annotation-based-compiler-plugins-ide-support")) { isTransitive = false }

0 commit comments

Comments
 (0)