From ccd6263787b9b36644193aeb1b1483ee2c4aa725 Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Thu, 22 Feb 2018 06:26:06 +0300 Subject: [PATCH] Use runtimeOnly dependency in kotlin-reflect "kotlin-reflect" is a shadow jar which breaks incremental compilation to avoid non-incremental builds, project should add * `compileOnly` dependency on ":kotlin-reflect-api" * `runtimeOnly` dependency on ":kotlin-reflect" * `runtime` dependency is not recommended because it leaks into compile * classpath through transitive dependencies --- compiler/frontend.script/build.gradle.kts | 2 +- prepare/compiler-embeddable/build.gradle.kts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/frontend.script/build.gradle.kts b/compiler/frontend.script/build.gradle.kts index 775010db1e7..03e97cbf1b1 100644 --- a/compiler/frontend.script/build.gradle.kts +++ b/compiler/frontend.script/build.gradle.kts @@ -11,7 +11,7 @@ dependencies { compileOnly(project(":kotlin-reflect-api")) compile(commonDep("org.jetbrains.kotlinx", "kotlinx-coroutines-core")) { isTransitive = false } compileOnly(intellijCoreDep()) { includeJars("intellij-core") } - runtime(project(":kotlin-reflect")) + runtimeOnly(project(":kotlin-reflect")) } sourceSets { diff --git a/prepare/compiler-embeddable/build.gradle.kts b/prepare/compiler-embeddable/build.gradle.kts index 29f312ea5d6..16c23fb19e0 100644 --- a/prepare/compiler-embeddable/build.gradle.kts +++ b/prepare/compiler-embeddable/build.gradle.kts @@ -8,7 +8,7 @@ plugins { dependencies { runtime(project(":kotlin-stdlib")) runtime(project(":kotlin-script-runtime")) - runtime(project(":kotlin-reflect")) + runtimeOnly(project(":kotlin-reflect")) } noDefaultJar()