Unify Kotlin daemon JVM arguments settings in Kotlin repo
Now 'kotlin-daemon-config' convention plugin should be added into settings plugins to configure Kotlin daemon.
This commit is contained in:
committed by
Space Team
parent
b9d19a864a
commit
ce39a02e0a
@@ -31,7 +31,6 @@ plugins {
|
||||
`kotlin-dsl`
|
||||
`java-gradle-plugin`
|
||||
id("org.jetbrains.kotlin.jvm")
|
||||
id("org.jetbrains.kotlin.plugin.sam.with.receiver")
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
|
||||
@@ -138,6 +138,7 @@ class CodeConformanceTest : TestCase() {
|
||||
"repo/gradle-settings-conventions/build-cache/build/generated-sources",
|
||||
"repo/gradle-settings-conventions/jvm-toolchain-provisioning/build/generated-sources",
|
||||
"repo/gradle-settings-conventions/gradle-enterprise/build/generated-sources",
|
||||
"repo/gradle-settings-conventions/kotlin-daemon-config/build/generated-sources"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ repositories {
|
||||
|
||||
dependencies {
|
||||
// TODO: migrate to api only dependency once Kotlin daemon configuration will be available there (Yahor)
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin-api")
|
||||
}
|
||||
|
||||
kotlin.jvmToolchain(8)
|
||||
|
||||
+5
-3
@@ -1,14 +1,16 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
|
||||
import org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemon
|
||||
|
||||
gradle.afterProject {
|
||||
plugins.withType<KotlinBasePlugin> {
|
||||
extensions.configure<KotlinTopLevelExtension> {
|
||||
tasks.withType<CompileUsingKotlinDaemon>().configureEach {
|
||||
// Should be in sync with 'gradle-settings-conventions/gradle.properties'
|
||||
kotlinDaemonJvmArgs = listOf(
|
||||
kotlinDaemonJvmArguments.set(
|
||||
listOf(
|
||||
"-Xmx3g",
|
||||
"-Dkotlin.js.compiler.legacy.force_enabled=true"
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user