diff --git a/README.md b/README.md index 5dd7e1b..a5543e1 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ dependencies { ``` #### **`gradle.properties`** ```properties -kotlinCorVersion=0.3.+ +kotlinCorVersion=0.3.1+ ``` ## Usage diff --git a/build.gradle.kts b/build.gradle.kts index dfa3f13..731e611 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ plugins { } group = "com.crowdproj.kotlin.cor" -version = "0.3.0" +version = "0.3.1" repositories { mavenCentral() @@ -24,6 +24,8 @@ kotlin { sourceSets { val coroutinesVersion: String by project + all { languageSettings.optIn("kotlin.RequiresOptIn") } + @Suppress("UNUSED_VARIABLE") val commonMain by getting { dependencies { diff --git a/gradle.properties b/gradle.properties index 490392e..0876e33 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ kotlinVersion=1.6.21 -coroutinesVersion=1.6.2 +coroutinesVersion=1.6.1-native-mt # -native-mt diff --git a/src/commonTest/kotlin/CorBaseTest.kt b/src/commonTest/kotlin/CorBaseTest.kt index dd156b5..9307a7a 100644 --- a/src/commonTest/kotlin/CorBaseTest.kt +++ b/src/commonTest/kotlin/CorBaseTest.kt @@ -4,13 +4,12 @@ import com.crowdproj.kotlin.cor.handlers.chain import com.crowdproj.kotlin.cor.handlers.parallel import com.crowdproj.kotlin.cor.handlers.worker import kotlinx.coroutines.ExperimentalCoroutinesApi -import kotlinx.coroutines.coroutineScope import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertEquals +@OptIn(ExperimentalCoroutinesApi::class) class CorBaseTest { - @OptIn(ExperimentalCoroutinesApi::class) @Test fun createCor() = runTest { val ctx = TestContext(some = 0) diff --git a/src/commonTest/kotlin/CorExceptionTest.kt b/src/commonTest/kotlin/CorExceptionTest.kt index 1e74305..f41e9ba 100644 --- a/src/commonTest/kotlin/CorExceptionTest.kt +++ b/src/commonTest/kotlin/CorExceptionTest.kt @@ -2,12 +2,14 @@ package com.crowdproj.kotlin.cor import com.crowdproj.kotlin.cor.handlers.chain import com.crowdproj.kotlin.cor.handlers.worker +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import kotlin.js.JsName import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNotEquals +@OptIn(ExperimentalCoroutinesApi::class) class CorExceptionTest { @Test @@ -63,7 +65,7 @@ class CorExceptionTest { throw e } } - except { e -> text = "${e.message}$testText2" ?: "" } + except { e -> text = "${e.message}$testText2" } } }.build() diff --git a/src/commonTest/kotlin/CorTest.kt b/src/commonTest/kotlin/CorTest.kt index 921e27e..e6620ce 100644 --- a/src/commonTest/kotlin/CorTest.kt +++ b/src/commonTest/kotlin/CorTest.kt @@ -1,10 +1,12 @@ package com.crowdproj.kotlin.cor +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertEquals import kotlin.test.assertNotEquals +@OptIn(ExperimentalCoroutinesApi::class) class CorTest { @Test diff --git a/src/commonTest/kotlin/LoopCorBaseTest.kt b/src/commonTest/kotlin/LoopCorBaseTest.kt index 680edcd..463227c 100644 --- a/src/commonTest/kotlin/LoopCorBaseTest.kt +++ b/src/commonTest/kotlin/LoopCorBaseTest.kt @@ -3,10 +3,12 @@ package com.crowdproj.kotlin.cor import com.crowdproj.kotlin.cor.handlers.loopUntil import com.crowdproj.kotlin.cor.handlers.loopWhile import com.crowdproj.kotlin.cor.handlers.worker +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.test.runTest import kotlin.test.Test import kotlin.test.assertEquals +@OptIn(ExperimentalCoroutinesApi::class) class LoopCorBaseTest { @Test fun loopUntil() = runTest {