From c50491789b76f3b445216fad1d2ae3c52e9b7556 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 12 Oct 2021 18:31:54 +0300 Subject: [PATCH 1/3] Update Kotlin to 1.6.0-RC --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 46eef4d76e..f0d49b5ef8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ # Kotlin version=1.5.2-SNAPSHOT group=org.jetbrains.kotlinx -kotlin_version=1.5.30 +kotlin_version=1.6.0-RC # Dependencies junit_version=4.12 From 6028ffd6727786e2c8f6ec76548f372d73e496cd Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 12 Oct 2021 19:06:01 +0300 Subject: [PATCH 2/3] migrate from deprecated API --- .../common/src/flow/operators/Delay.kt | 1 + .../common/test/DelayDurationTest.kt | 2 ++ .../SharingStartedWhileSubscribedTest.kt | 7 +++++-- .../jvm/test/examples/example-delay-01.kt | 1 + .../jvm/test/examples/example-delay-02.kt | 1 + .../jvm/test/examples/example-delay-03.kt | 1 + .../examples/example-delay-duration-01.kt | 1 + .../examples/example-delay-duration-02.kt | 1 + .../examples/example-delay-duration-03.kt | 1 + .../jvm/test/flow/SharedFlowStressTest.kt | 4 ++-- ui/kotlinx-coroutines-javafx/build.gradle.kts | 19 +++++++++++-------- 11 files changed, 27 insertions(+), 12 deletions(-) diff --git a/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt b/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt index fed5962bd5..e893f44ea5 100644 --- a/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt +++ b/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt @@ -23,6 +23,7 @@ import kotlin.time.* ----- INCLUDE .* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { ----- SUFFIX .* diff --git a/kotlinx-coroutines-core/common/test/DelayDurationTest.kt b/kotlinx-coroutines-core/common/test/DelayDurationTest.kt index 3dd55bde84..1c6c189a44 100644 --- a/kotlinx-coroutines-core/common/test/DelayDurationTest.kt +++ b/kotlinx-coroutines-core/common/test/DelayDurationTest.kt @@ -10,6 +10,8 @@ package kotlinx.coroutines import kotlin.test.* import kotlin.time.* +import kotlin.time.Duration.Companion.seconds +import kotlin.time.Duration.Companion.nanoseconds @ExperimentalTime class DelayDurationTest : TestBase() { diff --git a/kotlinx-coroutines-core/common/test/flow/sharing/SharingStartedWhileSubscribedTest.kt b/kotlinx-coroutines-core/common/test/flow/sharing/SharingStartedWhileSubscribedTest.kt index b3a3400389..3b961c5783 100644 --- a/kotlinx-coroutines-core/common/test/flow/sharing/SharingStartedWhileSubscribedTest.kt +++ b/kotlinx-coroutines-core/common/test/flow/sharing/SharingStartedWhileSubscribedTest.kt @@ -7,6 +7,8 @@ package kotlinx.coroutines.flow import kotlinx.coroutines.* import kotlin.test.* import kotlin.time.* +import kotlin.time.Duration.Companion.milliseconds +import kotlin.time.Duration.Companion.seconds class SharingStartedWhileSubscribedTest : TestBase() { @Test // make sure equals works properly, or otherwise other tests don't make sense @@ -30,14 +32,15 @@ class SharingStartedWhileSubscribedTest : TestBase() { @Test fun testDurationParams() { assertEquals(SharingStarted.WhileSubscribed(0), SharingStarted.WhileSubscribed(Duration.ZERO)) - assertEquals(SharingStarted.WhileSubscribed(10), SharingStarted.WhileSubscribed(Duration.milliseconds(10))) + assertEquals(SharingStarted.WhileSubscribed(10), SharingStarted.WhileSubscribed(10.milliseconds)) assertEquals(SharingStarted.WhileSubscribed(1000), SharingStarted.WhileSubscribed(1.seconds)) assertEquals(SharingStarted.WhileSubscribed(Long.MAX_VALUE), SharingStarted.WhileSubscribed(Duration.INFINITE)) assertEquals(SharingStarted.WhileSubscribed(replayExpirationMillis = 0), SharingStarted.WhileSubscribed(replayExpiration = Duration.ZERO)) assertEquals(SharingStarted.WhileSubscribed(replayExpirationMillis = 3), SharingStarted.WhileSubscribed( replayExpiration = Duration.milliseconds(3) )) - assertEquals(SharingStarted.WhileSubscribed(replayExpirationMillis = 7000), SharingStarted.WhileSubscribed(replayExpiration = 7.seconds)) + assertEquals(SharingStarted.WhileSubscribed(replayExpirationMillis = 7000), + SharingStarted.WhileSubscribed(replayExpiration = 7.seconds)) assertEquals(SharingStarted.WhileSubscribed(replayExpirationMillis = Long.MAX_VALUE), SharingStarted.WhileSubscribed(replayExpiration = Duration.INFINITE)) } diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-01.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-01.kt index d2a5d536b2..1bc3791cb5 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-01.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-01.kt @@ -7,6 +7,7 @@ package kotlinx.coroutines.examples.exampleDelay01 import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-02.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-02.kt index f74422e6b4..ac48af9ad5 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-02.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-02.kt @@ -7,6 +7,7 @@ package kotlinx.coroutines.examples.exampleDelay02 import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-03.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-03.kt index edaea74258..1fa9dc46be 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-03.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-03.kt @@ -7,6 +7,7 @@ package kotlinx.coroutines.examples.exampleDelay03 import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-01.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-01.kt index a19e6cb181..8c98684ed9 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-01.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-01.kt @@ -9,6 +9,7 @@ package kotlinx.coroutines.examples.exampleDelayDuration01 import kotlin.time.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-02.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-02.kt index 10ba88a54d..27ee7a88f5 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-02.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-02.kt @@ -9,6 +9,7 @@ package kotlinx.coroutines.examples.exampleDelayDuration02 import kotlin.time.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-03.kt b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-03.kt index 5fa980a6f8..8a53979c33 100644 --- a/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-03.kt +++ b/kotlinx-coroutines-core/jvm/test/examples/example-delay-duration-03.kt @@ -9,6 +9,7 @@ package kotlinx.coroutines.examples.exampleDelayDuration03 import kotlin.time.* import kotlinx.coroutines.* import kotlinx.coroutines.flow.* +import kotlin.time.Duration.Companion.milliseconds fun main() = runBlocking { diff --git a/kotlinx-coroutines-core/jvm/test/flow/SharedFlowStressTest.kt b/kotlinx-coroutines-core/jvm/test/flow/SharedFlowStressTest.kt index 349b7c8121..62a217cefa 100644 --- a/kotlinx-coroutines-core/jvm/test/flow/SharedFlowStressTest.kt +++ b/kotlinx-coroutines-core/jvm/test/flow/SharedFlowStressTest.kt @@ -71,7 +71,7 @@ class SharedFlowStressTest : TestBase() { var lastProduced = 0L var lastConsumed = 0L for (sec in 1..nSeconds) { - delay(1.seconds) + delay(Duration.seconds(1)) val produced = totalProduced.value val consumed = totalConsumed.value println("$sec sec: produced = $produced; consumed = $consumed") @@ -84,4 +84,4 @@ class SharedFlowStressTest : TestBase() { jobs.forEach { it.join() } println("total: produced = ${totalProduced.value}; consumed = ${totalConsumed.value}") } -} \ No newline at end of file +} diff --git a/ui/kotlinx-coroutines-javafx/build.gradle.kts b/ui/kotlinx-coroutines-javafx/build.gradle.kts index 9e30590cea..f9f66249eb 100644 --- a/ui/kotlinx-coroutines-javafx/build.gradle.kts +++ b/ui/kotlinx-coroutines-javafx/build.gradle.kts @@ -6,17 +6,20 @@ plugins { id("org.openjfx.javafxplugin") version "0.0.9" } +configurations { + register("javafx") + named("compileOnly") { + extendsFrom(configurations["javafx"]) + } + named("testImplementation") { + extendsFrom(configurations["javafx"]) + } +} + javafx { version = version("javafx") modules = listOf("javafx.controls") - configuration = "compileOnly" -} - -sourceSets { - test.configure { - compileClasspath += configurations.compileOnly - runtimeClasspath += configurations.compileOnly - } + configuration = "javafx" } val JDK_18: String? by lazy { From 0cf88f1905a37ced02a05f6719f778fafb12a669 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 12 Oct 2021 19:26:47 +0300 Subject: [PATCH 3/3] ~update DebugProbesKt.bin --- .../jvm/resources/DebugProbesKt.bin | Bin 1714 -> 1719 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/kotlinx-coroutines-core/jvm/resources/DebugProbesKt.bin b/kotlinx-coroutines-core/jvm/resources/DebugProbesKt.bin index 397aaf67ac52cdf6b99d39da8ddf1065bc098293..6c1500ae6e012b9ca4643da3671d498b39907235 100644 GIT binary patch delta 324 zcma)$OHKk&5Jk`9r5ou0aVQ`#Ad!y>3dsL6BfK^AGHL;g9rs2+O-vZToJA2!Vn7%% zxViTxRj2AB^_>cK`}GEBGhGE=*7vOzKDYMWm~P~};=HHb$EX7Onvc00Sj9numAu6 delta 282 zcmdnayNQ?U)W2Q(7#J8#80fY#tz+ zfq{>KlR*kdTLLi?13QBikOryZ0Mgcz7qE%|bqlabOg_uXZi6s^2gL+ABokyAtbsb& z8KFi