Do not blank opt in for allowing kotlin package in all subprojects
-Xallow-kotlin-package must be specified explicitly to prevent unintended declarations in kotlin package.
This commit is contained in:
@@ -331,7 +331,6 @@ allprojects {
|
|||||||
|
|
||||||
val commonCompilerArgs = listOfNotNull(
|
val commonCompilerArgs = listOfNotNull(
|
||||||
"-Xuse-experimental=kotlin.Experimental",
|
"-Xuse-experimental=kotlin.Experimental",
|
||||||
"-Xallow-kotlin-package",
|
|
||||||
"-Xread-deserialized-contracts",
|
"-Xread-deserialized-contracts",
|
||||||
"-Xjvm-default=compatibility",
|
"-Xjvm-default=compatibility",
|
||||||
"-Xprogressive".takeIf { hasProperty("test.progressive.mode") } // TODO: change to "-progressive" after bootstrap
|
"-Xprogressive".takeIf { hasProperty("test.progressive.mode") } // TODO: change to "-progressive" after bootstrap
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ pill {
|
|||||||
importAsLibrary = true
|
importAsLibrary = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
jar {
|
jar {
|
||||||
manifestAttributes(manifest, project, 'Test')
|
manifestAttributes(manifest, project, 'Test')
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,12 +31,16 @@ artifacts {
|
|||||||
|
|
||||||
javadocJar()
|
javadocJar()
|
||||||
|
|
||||||
|
tasks.withType(org.jetbrains.kotlin.gradle.dsl.KotlinCompile) {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
compileKotlinCommon {
|
compileKotlinCommon {
|
||||||
kotlinOptions {
|
kotlinOptions {
|
||||||
freeCompilerArgs = [
|
freeCompilerArgs += [
|
||||||
"-module-name", project.name,
|
"-module-name", project.name,
|
||||||
"-Xallow-kotlin-package",
|
|
||||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts"
|
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ sourceSets {
|
|||||||
"test" { projectDefault() }
|
"test" { projectDefault() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
publish()
|
publish()
|
||||||
|
|
||||||
runtimeJar()
|
runtimeJar()
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ sourceSets {
|
|||||||
"test" { }
|
"test" { }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
publish()
|
publish()
|
||||||
|
|
||||||
standardPublicJars()
|
standardPublicJars()
|
||||||
|
|||||||
@@ -27,6 +27,10 @@ sourceSets {
|
|||||||
"test" { projectDefault() }
|
"test" { projectDefault() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
projectTest(parallel = true)
|
projectTest(parallel = true)
|
||||||
|
|
||||||
projectTest(taskName = "embeddableTest", parallel = true) {
|
projectTest(taskName = "embeddableTest", parallel = true) {
|
||||||
|
|||||||
@@ -26,6 +26,10 @@ sourceSets {
|
|||||||
"test" {}
|
"test" {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
standardPublicJars()
|
standardPublicJars()
|
||||||
|
|
||||||
projectTest(parallel = true)
|
projectTest(parallel = true)
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ sourceSets {
|
|||||||
"test" { projectDefault() }
|
"test" { projectDefault() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
projectTest(parallel = true) {
|
projectTest(parallel = true) {
|
||||||
dependsOn(":dist")
|
dependsOn(":dist")
|
||||||
workingDir = rootDir
|
workingDir = rootDir
|
||||||
|
|||||||
@@ -28,5 +28,9 @@ sourceSets {
|
|||||||
"test" {}
|
"test" {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
standardPublicJars()
|
standardPublicJars()
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,10 @@ sourceSets {
|
|||||||
"test" { projectDefault() }
|
"test" { projectDefault() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType<org.jetbrains.kotlin.gradle.dsl.KotlinCompile<*>> {
|
||||||
|
kotlinOptions.freeCompilerArgs += "-Xallow-kotlin-package"
|
||||||
|
}
|
||||||
|
|
||||||
publish()
|
publish()
|
||||||
|
|
||||||
runtimeJar()
|
runtimeJar()
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ tasks.withType<KotlinCompile> {
|
|||||||
freeCompilerArgs += listOf(
|
freeCompilerArgs += listOf(
|
||||||
"-module-name",
|
"-module-name",
|
||||||
"kotlin-stdlib",
|
"kotlin-stdlib",
|
||||||
|
"-Xallow-kotlin-package",
|
||||||
"-Xmulti-platform",
|
"-Xmulti-platform",
|
||||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||||
"-Xuse-experimental=kotlin.Experimental"
|
"-Xuse-experimental=kotlin.Experimental"
|
||||||
|
|||||||
Reference in New Issue
Block a user