Remove experimental coroutines opt-in from build scripts
It has no effect in Kotlin 1.3 Only enable coroutines if '-ReleaseCoroutines' is used
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -21,7 +20,3 @@ sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
|
||||
kotlin {
|
||||
experimental.coroutines = Coroutines.ENABLE
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -20,7 +19,3 @@ sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
kotlin {
|
||||
experimental.coroutines = Coroutines.ENABLE
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -17,7 +16,3 @@ sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
kotlin {
|
||||
experimental.coroutines = Coroutines.ENABLE
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -19,8 +18,6 @@ sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines = Coroutines.ENABLE
|
||||
|
||||
val jar = runtimeJar()
|
||||
val sourcesJar = sourcesJar()
|
||||
val javadocJar = javadocJar()
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
id("jps-compatible")
|
||||
@@ -25,8 +23,6 @@ sourceSets {
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines = Coroutines.ENABLE
|
||||
|
||||
standardPublicJars()
|
||||
|
||||
publish()
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
@@ -18,8 +17,6 @@ sourceSets {
|
||||
"test" {}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines = Coroutines.ENABLE
|
||||
|
||||
val jar = runtimeJar()
|
||||
val sourcesJar = sourcesJar()
|
||||
val javadocJar = javadocJar()
|
||||
|
||||
@@ -72,6 +72,7 @@ compileCoroutinesKotlinCommon {
|
||||
"-module-name", project.name+"-coroutines",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xcoroutines=enable",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xallow-result-return-type"
|
||||
@@ -87,8 +88,6 @@ compileTestKotlinCommon {
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
jar {
|
||||
manifestAttributes(manifest, project, 'Main')
|
||||
from sourceSets.coroutines.output
|
||||
|
||||
@@ -86,8 +86,6 @@ compileTestKotlin {
|
||||
|
||||
compileJava9Sources(project, 'kotlin.stdlib.jdk7')
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
test {
|
||||
executable = "$JDK_17/bin/java"
|
||||
}
|
||||
|
||||
@@ -89,8 +89,6 @@ compileTestKotlin {
|
||||
|
||||
compileJava9Sources(project, 'kotlin.stdlib.jdk8')
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
test {
|
||||
executable = "$JDK_18/bin/java"
|
||||
}
|
||||
|
||||
@@ -71,8 +71,6 @@ compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
test {
|
||||
executable = "$JDK_17/bin/java"
|
||||
}
|
||||
|
||||
@@ -74,8 +74,6 @@ compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs = ["-Xallow-kotlin-package", "-Xnormalize-constructor-calls=enable", "-Xmulti-platform", "-XXLanguage:+ReleaseCoroutines", "-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"]
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
test {
|
||||
executable = "$JDK_18/bin/java"
|
||||
}
|
||||
|
||||
@@ -122,8 +122,6 @@ task prepareBuiltinsSources(type: Copy) {
|
||||
into builtinsSrcDir
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines "enable"
|
||||
|
||||
tasks.withType(org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile) {
|
||||
kotlinOptions {
|
||||
main = "noCall"
|
||||
@@ -185,6 +183,7 @@ compileCoroutinesKotlin2Js {
|
||||
freeCompilerArgs += [
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xcoroutines=enable",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -212,6 +212,7 @@ compileCoroutinesKotlin {
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xcoroutines=enable",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-module-name", "kotlin-stdlib-coroutines"
|
||||
]
|
||||
@@ -264,5 +265,3 @@ test {
|
||||
systemProperty("kotlin.stdlib.test.long.sequences", "true")
|
||||
}
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
@@ -14,8 +14,6 @@ compileTestKotlin {
|
||||
kotlinOptions.freeCompilerArgs += ["-XXLanguage:+ReleaseCoroutines"]
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
test {
|
||||
executable = "$JDK_18/bin/java"
|
||||
}
|
||||
|
||||
-6
@@ -15,12 +15,6 @@ repositories {
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
experimental {
|
||||
coroutines 'enable'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
}
|
||||
@@ -49,5 +49,4 @@ compileKotlin {
|
||||
]
|
||||
}
|
||||
|
||||
kotlin.experimental.coroutines 'enable'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user