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`
|
`kotlin-dsl`
|
||||||
`java-gradle-plugin`
|
`java-gradle-plugin`
|
||||||
id("org.jetbrains.kotlin.jvm")
|
id("org.jetbrains.kotlin.jvm")
|
||||||
id("org.jetbrains.kotlin.plugin.sam.with.receiver")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gradlePlugin {
|
gradlePlugin {
|
||||||
|
|||||||
@@ -138,6 +138,7 @@ class CodeConformanceTest : TestCase() {
|
|||||||
"repo/gradle-settings-conventions/build-cache/build/generated-sources",
|
"repo/gradle-settings-conventions/build-cache/build/generated-sources",
|
||||||
"repo/gradle-settings-conventions/jvm-toolchain-provisioning/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/gradle-enterprise/build/generated-sources",
|
||||||
|
"repo/gradle-settings-conventions/kotlin-daemon-config/build/generated-sources"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ repositories {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// TODO: migrate to api only dependency once Kotlin daemon configuration will be available there (Yahor)
|
// 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)
|
kotlin.jvmToolchain(8)
|
||||||
|
|||||||
+7
-5
@@ -1,13 +1,15 @@
|
|||||||
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
|
|
||||||
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
|
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
|
||||||
|
import org.jetbrains.kotlin.gradle.tasks.CompileUsingKotlinDaemon
|
||||||
|
|
||||||
gradle.afterProject {
|
gradle.afterProject {
|
||||||
plugins.withType<KotlinBasePlugin> {
|
plugins.withType<KotlinBasePlugin> {
|
||||||
extensions.configure<KotlinTopLevelExtension> {
|
tasks.withType<CompileUsingKotlinDaemon>().configureEach {
|
||||||
// Should be in sync with 'gradle-settings-conventions/gradle.properties'
|
// Should be in sync with 'gradle-settings-conventions/gradle.properties'
|
||||||
kotlinDaemonJvmArgs = listOf(
|
kotlinDaemonJvmArguments.set(
|
||||||
"-Xmx3g",
|
listOf(
|
||||||
"-Dkotlin.js.compiler.legacy.force_enabled=true"
|
"-Xmx3g",
|
||||||
|
"-Dkotlin.js.compiler.legacy.force_enabled=true"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user