Specify module name via moduleName option instead of freeCompilerArgs
This allows to get rid of warnings about duplicate module name in some of the modules.
This commit is contained in:
@@ -51,9 +51,9 @@ tasks {
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xcoroutines=enable",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-Xno-use-ir",
|
||||
"-module-name", "kotlin-coroutines-experimental-compat"
|
||||
"-Xno-use-ir"
|
||||
)
|
||||
moduleName = "kotlin-coroutines-experimental-compat"
|
||||
}
|
||||
}
|
||||
val compileTestKotlin by existing(KotlinCompile::class) {
|
||||
|
||||
@@ -76,10 +76,10 @@ compileKotlin {
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-module-name", project.name,
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
@@ -70,8 +70,8 @@ compileKotlin {
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-module-name", project.name
|
||||
]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
@@ -63,13 +63,12 @@ tasks.withType<KotlinCompile> {
|
||||
dependsOn(copySources)
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += listOf(
|
||||
"-module-name",
|
||||
"kotlin-stdlib",
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xmulti-platform",
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts"
|
||||
)
|
||||
moduleName = "kotlin-stdlib"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -117,12 +117,12 @@ compileKotlin {
|
||||
"-Xallow-result-return-type",
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xnormalize-constructor-calls=enable",
|
||||
"-module-name", "kotlin-stdlib",
|
||||
"-Xopt-in=kotlin.RequiresOptIn",
|
||||
"-Xopt-in=kotlin.ExperimentalMultiplatform",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xinline-classes"
|
||||
]
|
||||
moduleName = "kotlin-stdlib"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user