Switch sourcesets of experimental and release coroutines
- Move experimental coroutines out of the main source root. - Include experimental coroutines into the coroutines source set. - Include release coroutines into the main source set.
This commit is contained in:
@@ -19,6 +19,8 @@ sourceSets {
|
||||
srcDir 'src'
|
||||
srcDir commonSrcDir
|
||||
srcDir '../unsigned/src'
|
||||
srcDir '../coroutines/common/src'
|
||||
srcDir '../coroutines/src'
|
||||
}
|
||||
}
|
||||
test {
|
||||
@@ -29,8 +31,7 @@ sourceSets {
|
||||
}
|
||||
coroutines {
|
||||
kotlin {
|
||||
srcDir '../coroutines/common/src'
|
||||
srcDir '../coroutines/src'
|
||||
srcDir '../coroutines-experimental/src'
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,6 +58,7 @@ compileKotlinCommon {
|
||||
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:+InlineClasses",
|
||||
"-XXLanguage:+ReleaseCoroutines",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
@@ -69,6 +71,7 @@ compileCoroutinesKotlinCommon {
|
||||
freeCompilerArgs = [
|
||||
"-module-name", project.name+"-coroutines",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-Xallow-kotlin-package"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import kotlin.*
|
||||
import kotlin.text.*
|
||||
import kotlin.comparisons.*
|
||||
import kotlin.random.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
/**
|
||||
* Returns `true` if [element] is found in the sequence.
|
||||
|
||||
+2
@@ -3,6 +3,8 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
|
||||
package kotlin.coroutines.experimental.intrinsics
|
||||
|
||||
import kotlin.coroutines.experimental.Continuation
|
||||
+1
@@ -5,6 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
|
||||
package kotlin.coroutines.experimental.intrinsics
|
||||
|
||||
+1
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
@file:kotlin.jvm.JvmName("CoroutinesKt")
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
|
||||
package kotlin.coroutines.experimental
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
|
||||
@file:Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
package kotlin.coroutines.experimental.intrinsics
|
||||
|
||||
import kotlin.coroutines.experimental.*
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "UNCHECKED_CAST")
|
||||
|
||||
package kotlin.coroutines.intrinsics
|
||||
|
||||
import kotlin.coroutines.*
|
||||
@@ -121,6 +119,7 @@ private inline fun <T> createCoroutineFromSuspendFunction(
|
||||
completion: Continuation<T>,
|
||||
crossinline block: () -> Any?
|
||||
): Continuation<Unit> {
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
return object : CoroutineImpl(completion as Continuation<Any?>) {
|
||||
override fun doResume(): Any? {
|
||||
exception?.let { throw it }
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER", "UNCHECKED_CAST")
|
||||
@file:Suppress("UNCHECKED_CAST")
|
||||
|
||||
package kotlin.coroutines.intrinsics
|
||||
|
||||
|
||||
@@ -8,10 +8,7 @@
|
||||
"UNCHECKED_CAST",
|
||||
"RedundantVisibilityModifier",
|
||||
"NON_PUBLIC_PRIMARY_CONSTRUCTOR_OF_INLINE_CLASS",
|
||||
"UNSUPPORTED_FEATURE",
|
||||
"INVISIBLE_REFERENCE",
|
||||
"INVISIBLE_MEMBER",
|
||||
"CANNOT_OVERRIDE_INVISIBLE_MEMBER"
|
||||
"UNSUPPORTED_FEATURE"
|
||||
)
|
||||
|
||||
package kotlin
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
|
||||
package kotlin.coroutines
|
||||
|
||||
import kotlin.coroutines.intrinsics.*
|
||||
|
||||
@@ -3,8 +3,6 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
|
||||
package kotlin.coroutines
|
||||
|
||||
import kotlin.coroutines.CoroutineContext.*
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@file:kotlin.jvm.JvmName("IntrinsicsKt")
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
|
||||
@file:kotlin.jvm.JvmMultifileClass
|
||||
@file:kotlin.jvm.JvmName("SequenceBuilderKt")
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ def builtinsSrcDir2 = "${buildDir}/builtin-sources-for-builtins"
|
||||
def commonSrcDir = "${projectDir}/../src/kotlin"
|
||||
def commonSrcDir2 = "${projectDir}/../common/src"
|
||||
def coroutinesJsSrcDir = "${projectDir}/../coroutines/js/src"
|
||||
def coroutinesExpJsSrcDir = "${projectDir}/../coroutines-experimental/js/src"
|
||||
|
||||
def builtinsDir = "${rootDir}/core/builtins"
|
||||
def experimentalSrcDir = "${rootDir}/libraries/stdlib/experimental"
|
||||
@@ -46,6 +47,7 @@ sourceSets {
|
||||
kotlin {
|
||||
srcDir builtinsSrcDir
|
||||
srcDir jsSrcDir
|
||||
srcDir coroutinesJsSrcDir
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +66,7 @@ sourceSets {
|
||||
|
||||
coroutines {
|
||||
kotlin {
|
||||
srcDir coroutinesJsSrcDir
|
||||
srcDir coroutinesExpJsSrcDir
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -152,7 +154,7 @@ compileKotlin2Js {
|
||||
"-Xuse-experimental=kotlin.ExperimentalMultiplatform",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:+InlineClasses",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
"-XXLanguage:+ReleaseCoroutines"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -177,7 +179,8 @@ compileCoroutinesKotlin2Js {
|
||||
sourceMap = true
|
||||
sourceMapPrefix = "./"
|
||||
freeCompilerArgs += [
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts"
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ sourceSets {
|
||||
srcDir "${rootDir}/core/builtins/src"
|
||||
srcDir 'runtime'
|
||||
srcDir 'src'
|
||||
srcDir '../coroutines/jvm/src'
|
||||
}
|
||||
}
|
||||
experimental {
|
||||
@@ -39,7 +40,7 @@ sourceSets {
|
||||
}
|
||||
coroutines {
|
||||
kotlin {
|
||||
srcDir '../coroutines/jvm/src'
|
||||
srcDir '../coroutines-experimental/jvm/src'
|
||||
}
|
||||
}
|
||||
coroutinesTest {
|
||||
@@ -183,7 +184,7 @@ compileKotlin {
|
||||
"-Xuse-experimental=kotlin.Experimental",
|
||||
"-Xuse-experimental=kotlin.ExperimentalMultiplatform",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-XXLanguage:+ReleaseCoroutines",
|
||||
"-XXLanguage:+InlineClasses"
|
||||
]
|
||||
}
|
||||
@@ -214,6 +215,7 @@ compileCoroutinesKotlin {
|
||||
"-Xallow-kotlin-package",
|
||||
"-Xmultifile-parts-inherit",
|
||||
"-Xuse-experimental=kotlin.contracts.ExperimentalContracts",
|
||||
"-XXLanguage:-ReleaseCoroutines",
|
||||
"-module-name", "kotlin-stdlib-coroutines"
|
||||
]
|
||||
}
|
||||
@@ -254,7 +256,8 @@ compileUnsignedKotlin {
|
||||
compileTestKotlin {
|
||||
kotlinOptions {
|
||||
freeCompilerArgs += [
|
||||
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes"
|
||||
"-Xuse-experimental=kotlin.ExperimentalUnsignedTypes",
|
||||
"-XXLanguage:-ReleaseCoroutines"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@ package kotlin.sequences
|
||||
import kotlin.*
|
||||
import kotlin.text.*
|
||||
import kotlin.comparisons.*
|
||||
import kotlin.coroutines.experimental.*
|
||||
|
||||
/**
|
||||
* Returns a sequence containing all elements that are instances of specified class.
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
package kotlin.sequences
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.coroutines.experimental.buildSequence
|
||||
|
||||
/**
|
||||
* Given an [iterator] function constructs a [Sequence] that returns values through the [Iterator]
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
package kotlin.collections
|
||||
|
||||
import kotlin.*
|
||||
import kotlin.coroutines.experimental.buildIterator
|
||||
|
||||
internal fun checkWindowSizeStep(size: Int, step: Int) {
|
||||
require(size > 0 && step > 0) {
|
||||
|
||||
@@ -101,10 +101,6 @@ fun List<MemberBuilder>.writeTo(file: File, platformSource: PlatformSourceFile)
|
||||
writer.appendln("import kotlin.random.*")
|
||||
}
|
||||
|
||||
if (sourceFile == SourceFile.Sequences) {
|
||||
writer.appendln("import kotlin.coroutines.experimental.*")
|
||||
}
|
||||
|
||||
writer.appendln()
|
||||
|
||||
for (f in this) {
|
||||
|
||||
Reference in New Issue
Block a user