bissell
06/17/2018, 2:43 AMkotlinOptions
from subprojects
in the root build.gradle, and not have them be overwritten by module-specific configs? e.g., I have an MPP where the root project contains:
subprojects {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions.freeCompilerArgs += ['-Xprogressive']
}
}
and I want that setting to be respected in each of the platform modules. Then, my JS build.gradle has:
[compileKotlin2Js, compileTestKotlin2Js]*.configure {
kotlinOptions {
metaInfo = true
sourceMap = true
sourceMapEmbedSources = "always"
moduleKind = 'umd'
// freeCompilerArgs += ['-Xprogressive']
}
}
If I leave that freeCompilerArgs line commented, it seems like the setting doesn't flow through to the JS compilation step, i.e. the entire kotlinOptions
config in the JS subproject is being overwritten, and if freeCompilerArgs
isn't present then they're not applied to the JS build.