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
c080765905
commit
b9d19a864a
@@ -7,3 +7,4 @@ Provides common settings convention plugins for the repo.
|
||||
- "build-cache" - local and remote build cache configuration
|
||||
- "gradle-enterprise" - configures build scans upload
|
||||
- "jvm-toolchain-provisioning" - configures JVM toolchain to download project JDKs via Disco API
|
||||
- "kotlin-daemon-config" - common project JVM arguments for Kotlin daemon
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
kotlin.build.gradlePlugin.version=0.0.39
|
||||
kotlin.options.suppressFreeCompilerArgsModificationWarning=true
|
||||
cacheRedirectorEnabled=true
|
||||
# Should be the same as in the root gradle.properties to avoid spawning second daemon
|
||||
# Should be in sync with ":kotlin-daemon-config" project convention script configuration
|
||||
kotlin.daemon.jvmargs=-Xmx3g -Dkotlin.js.compiler.legacy.force_enabled=true
|
||||
@@ -0,0 +1,16 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
id("org.jetbrains.kotlin.jvm")
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// TODO: migrate to api only dependency once Kotlin daemon configuration will be available there (Yahor)
|
||||
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin")
|
||||
}
|
||||
|
||||
kotlin.jvmToolchain(8)
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinTopLevelExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinBasePlugin
|
||||
|
||||
gradle.afterProject {
|
||||
plugins.withType<KotlinBasePlugin> {
|
||||
extensions.configure<KotlinTopLevelExtension> {
|
||||
// Should be in sync with 'gradle-settings-conventions/gradle.properties'
|
||||
kotlinDaemonJvmArgs = listOf(
|
||||
"-Xmx3g",
|
||||
"-Dkotlin.js.compiler.legacy.force_enabled=true"
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ plugins {
|
||||
include(":build-cache")
|
||||
include(":gradle-enterprise")
|
||||
include(":jvm-toolchain-provisioning")
|
||||
include(":kotlin-daemon-config")
|
||||
|
||||
// Unfortunately it is not possible to apply build-cache.settings.gradle.kts as script compilation
|
||||
// could not then find types from "kotlin-build-gradle-plugin"
|
||||
|
||||
Reference in New Issue
Block a user