Unify kotlinCompilerClasspath for all projects
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
This commit is contained in:
@@ -22,6 +22,8 @@ dependencies {
|
||||
}
|
||||
}
|
||||
|
||||
project.applyFixForStdlib16()
|
||||
|
||||
apply(from = "$rootDir/gradle/cacheRedirector.gradle.kts")
|
||||
project.configureJvmDefaultToolchain()
|
||||
project.addEmbeddedConfigurations()
|
||||
@@ -99,7 +101,7 @@ fun Project.configureJavaBasePlugin() {
|
||||
}
|
||||
|
||||
fun Project.configureKotlinCompilationOptions() {
|
||||
plugins.withType<KotlinBasePluginWrapper>() {
|
||||
plugins.withType<KotlinBasePluginWrapper> {
|
||||
val commonCompilerArgs = listOfNotNull(
|
||||
"-opt-in=kotlin.RequiresOptIn",
|
||||
"-progressive".takeIf { hasProperty("test.progressive.mode") }
|
||||
@@ -189,6 +191,16 @@ fun Project.configureKotlinCompilationOptions() {
|
||||
}
|
||||
}
|
||||
|
||||
// Still compile stdlib, reflect, kotlin.test and scripting runtimes
|
||||
// with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.
|
||||
fun Project.applyFixForStdlib16() {
|
||||
plugins.withType<KotlinBasePluginWrapper>() {
|
||||
dependencies {
|
||||
"kotlinCompilerClasspath"(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Project.configureArtifacts() {
|
||||
tasks.withType<Javadoc>().configureEach {
|
||||
enabled = false
|
||||
|
||||
@@ -8,7 +8,6 @@ project.updateJvmTarget("1.6")
|
||||
dependencies {
|
||||
api(kotlinStdlib())
|
||||
testApi(project(":kotlin-test:kotlin-test-jvm"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -7,7 +7,6 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_1_6)
|
||||
|
||||
dependencies {
|
||||
api(project(":core:compiler.common"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -9,7 +9,6 @@ dependencies {
|
||||
api(project(":core:util.runtime"))
|
||||
api(kotlinStdlib())
|
||||
api(project(":kotlin-annotations-jvm"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -13,7 +13,6 @@ dependencies {
|
||||
api(project(":core:deserialization.common.jvm"))
|
||||
api(project(":core:util.runtime"))
|
||||
api(commonDependency("javax.inject"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -26,8 +26,6 @@ dependencies {
|
||||
testApi(projectTests(":generators:test-generator"))
|
||||
|
||||
testApi(intellijCore())
|
||||
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -10,7 +10,6 @@ dependencies {
|
||||
api(project(":core:util.runtime"))
|
||||
api(kotlinStdlib())
|
||||
api(project(":kotlin-annotations-jvm"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -9,7 +9,6 @@ dependencies {
|
||||
api(project(":core:metadata.jvm"))
|
||||
api(project(":core:deserialization.common"))
|
||||
implementation(project(":core:compiler.common.jvm"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -8,7 +8,6 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_1_6)
|
||||
dependencies {
|
||||
api(project(":core:compiler.common"))
|
||||
api(project(":core:metadata"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -11,7 +11,6 @@ dependencies {
|
||||
api(project(":core:util.runtime"))
|
||||
api(project(":core:descriptors"))
|
||||
api(commonDependency("javax.inject"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -7,7 +7,6 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_1_6)
|
||||
|
||||
dependencies {
|
||||
api(project(":core:metadata"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -8,7 +8,6 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_1_6)
|
||||
dependencies {
|
||||
api(protobufLite())
|
||||
api(kotlinStdlib())
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -7,7 +7,6 @@ project.configureJvmToolchain(JdkMajorVersion.JDK_1_6)
|
||||
|
||||
dependencies {
|
||||
compileOnly(kotlinStdlib())
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -7,7 +7,6 @@ JvmToolchain.updateJvmTarget(project, "1.6")
|
||||
dependencies {
|
||||
api kotlinStdlib("common")
|
||||
testApi project(":kotlin-test:kotlin-test-annotations-common")
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -16,7 +16,6 @@ dependencies {
|
||||
expectedBy project(':kotlin-test:kotlin-test-annotations-common')
|
||||
api project(':kotlin-test:kotlin-test-jvm')
|
||||
api('junit:junit:4.13.2')
|
||||
kotlinCompilerClasspath(project(':libraries:tools:stdlib-compiler-classpath'))
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ dependencies {
|
||||
api(kotlinStdlib())
|
||||
testApi(project(":kotlin-test:kotlin-test-junit"))
|
||||
testApi('junit:junit:4.13.2')
|
||||
kotlinCompilerClasspath(project(':libraries:tools:stdlib-compiler-classpath'))
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -20,7 +20,6 @@ dependencies {
|
||||
if (includeJava9) {
|
||||
java9CompileOnly('org.testng:testng:7.0.0')
|
||||
}
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -29,7 +29,6 @@ dependencies {
|
||||
compileOnly project(':core:descriptors.runtime')
|
||||
compileOnly project(':core:util.runtime')
|
||||
compileOnly "org.jetbrains:annotations:13.0"
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
if (includeJava9) {
|
||||
|
||||
@@ -9,7 +9,6 @@ dependencies {
|
||||
api(kotlinStdlib())
|
||||
compileOnly(project(":kotlin-reflect-api"))
|
||||
testApi(commonDependency("junit"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -21,7 +21,6 @@ dependencies {
|
||||
testRuntimeOnly("org.slf4j:slf4j-nop:1.7.36")
|
||||
testImplementation(kotlin("reflect"))
|
||||
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -10,7 +10,6 @@ dependencies {
|
||||
api(project(":kotlin-scripting-common"))
|
||||
testApi(commonDependency("junit"))
|
||||
testImplementation(commonDependency("org.jetbrains.kotlinx", "kotlinx-coroutines-core"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -10,7 +10,6 @@ dependencies {
|
||||
api(kotlinStdlib())
|
||||
api(project(":kotlin-scripting-common"))
|
||||
testApi(commonDependency("junit"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -44,7 +44,6 @@ configurations {
|
||||
dependencies {
|
||||
api project(':kotlin-stdlib')
|
||||
testApi project(':kotlin-test:kotlin-test-junit')
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -20,7 +20,6 @@ val builtins by configurations.creating {
|
||||
dependencies {
|
||||
compileOnly(project(":kotlin-stdlib"))
|
||||
builtins(project(":core:builtins"))
|
||||
kotlinCompilerClasspath(project(":libraries:tools:stdlib-compiler-classpath"))
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
@@ -63,8 +63,6 @@ dependencies {
|
||||
testApi project(':kotlin-test:kotlin-test-junit')
|
||||
|
||||
builtins project(':core:builtins')
|
||||
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
jar {
|
||||
|
||||
@@ -16,7 +16,6 @@ sourceSets {
|
||||
|
||||
dependencies {
|
||||
compileOnly DependenciesKt.kotlinBuiltins(project)
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
configureSourcesJar()
|
||||
|
||||
@@ -8,7 +8,6 @@ configurePublishing(project)
|
||||
|
||||
dependencies {
|
||||
compileOnly kotlinStdlib()
|
||||
kotlinCompilerClasspath project(':libraries:tools:stdlib-compiler-classpath')
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
|
||||
Reference in New Issue
Block a user