[Commonizer] Add Gradle property to pass JVM args
^KT-39094
This commit is contained in:
+3
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.compilerRunner
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.gradle.plugin.KLIB_COMMONIZER_CLASSPATH_CONFIGURATION_NAME
|
||||
import org.jetbrains.kotlin.gradle.plugin.PropertiesProvider
|
||||
import org.jetbrains.kotlin.gradle.plugin.getKotlinPluginVersion
|
||||
import java.io.File
|
||||
|
||||
@@ -31,4 +32,6 @@ internal class KotlinNativeKlibCommonizerToolRunner(project: Project) : KotlinTo
|
||||
override val defaultMaxHeapSize: String get() = "4G"
|
||||
|
||||
override val mustRunViaExec get() = true // because it's not enough the standard Gradle wrapper's heap size
|
||||
|
||||
override fun getCustomJvmArgs() = PropertiesProvider(project).commonizerJvmArgs?.split("\\s+".toRegex()).orEmpty()
|
||||
}
|
||||
|
||||
+6
@@ -173,6 +173,12 @@ internal class PropertiesProvider private constructor(private val project: Proje
|
||||
val nativeEnableParallelExecutionCheck: Boolean
|
||||
get() = booleanProperty(KOTLIN_NATIVE_ENABLE_PARALLEL_EXECUTION_CHECK) ?: true
|
||||
|
||||
/**
|
||||
* Allows a user to specify additional arguments of a JVM executing KLIB commonizer.
|
||||
*/
|
||||
val commonizerJvmArgs: String?
|
||||
get() = property("kotlin.commonizer.jvmArgs")
|
||||
|
||||
/**
|
||||
* Dependencies caching strategy. The default is static.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user