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:
@@ -31,7 +31,8 @@ configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
@@ -41,7 +41,8 @@ tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile) {
|
||||
}
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
@@ -45,8 +45,8 @@ configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable",
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts",
|
||||
"-module-name", project.archivesBaseName, ]
|
||||
"-Xopt-in=kotlin.contracts.ExperimentalContracts"]
|
||||
kotlinOptions.moduleName = project.archivesBaseName
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
@@ -34,7 +34,8 @@ configureSourcesJar()
|
||||
configureJavadocJar()
|
||||
|
||||
compileKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-module-name", project.name]
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package"]
|
||||
kotlinOptions.moduleName = project.name
|
||||
}
|
||||
|
||||
compileTestKotlin {
|
||||
|
||||
Reference in New Issue
Block a user