Fix -Xmulti-platform dropped from args when freeCompilerArgs is assigned
in user build script Issue #KT-15371 Fixed
This commit is contained in:
-4
@@ -54,10 +54,6 @@ open class KotlinPlatformImplementationPluginBase(platformName: String) : Kotlin
|
||||
private val platformKotlinTasksBySourceSetName = hashMapOf<String, AbstractKotlinCompile<*>>()
|
||||
|
||||
override fun apply(project: Project) {
|
||||
project.tasks.withType(AbstractKotlinCompile::class.java).all {
|
||||
(it as KotlinCompile<*>).kotlinOptions.freeCompilerArgs += listOf("-Xmulti-platform")
|
||||
}
|
||||
|
||||
project.tasks.filterIsInstance<AbstractKotlinCompile<*>>().associateByTo(platformKotlinTasksBySourceSetName) { it.sourceSetName }
|
||||
|
||||
val implementConfig = project.configurations.create(IMPLEMENT_CONFIG_NAME)
|
||||
|
||||
+2
@@ -233,6 +233,8 @@ abstract class AbstractKotlinCompile<T : CommonCompilerArguments>() : AbstractKo
|
||||
args.verbose = true
|
||||
}
|
||||
|
||||
args.multiPlatform = project.plugins.any { it is KotlinPlatformPluginBase }
|
||||
|
||||
setupPlugins(args)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user