diff --git a/build.gradle.kts b/build.gradle.kts index a0a735c64..7b002c634 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,7 +44,7 @@ allprojects { kotlinOptions { // note: change this to 1.4 when upgrading to Kotlin 1.4 // KN can only be built using the current kotlin version. - apiVersion = "1.3" + apiVersion = "1.4" } } } diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index 28340f365..8f20d85da 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -17,7 +17,6 @@ object Dependencies { val mockitoInline = "org.mockito:mockito-inline:2.23.4" val kotlinCoroutinesCore = "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3" - val kotlinCoroutinesNative = "org.jetbrains.kotlinx:kotlinx-coroutines-core-native:1.4.3" val autoService = "com.google.auto.service:auto-service:1.0-rc4" } diff --git a/spek-runtime/build.gradle.kts b/spek-runtime/build.gradle.kts index 79c2df5da..b6fecdf26 100644 --- a/spek-runtime/build.gradle.kts +++ b/spek-runtime/build.gradle.kts @@ -82,9 +82,6 @@ kotlin { val nativeMain by creating { dependsOn(commonMain) - dependencies { - implementation(Dependencies.kotlinCoroutinesNative) - } } linuxX64("linux") { diff --git a/spek-runtime/src/nativeMain/kotlin/org/spekframework/spek2/runtime/timeout.kt b/spek-runtime/src/nativeMain/kotlin/org/spekframework/spek2/runtime/timeout.kt index fa1799833..2625ef1c4 100644 --- a/spek-runtime/src/nativeMain/kotlin/org/spekframework/spek2/runtime/timeout.kt +++ b/spek-runtime/src/nativeMain/kotlin/org/spekframework/spek2/runtime/timeout.kt @@ -1,7 +1,7 @@ package org.spekframework.spek2.runtime import kotlin.time.ExperimentalTime -import kotlin.time.MonoClock +import kotlin.time.TimeSource import kotlin.time.measureTime actual fun getGlobalTimeoutSetting(default: Long): Long { @@ -18,7 +18,7 @@ actual fun isConcurrentExecutionEnabled(default: Boolean): Boolean { @UseExperimental(ExperimentalTime::class) actual fun measureTime(block: () -> Unit): Long { - return MonoClock.measureTime(block).inMilliseconds.toLong() + return TimeSource.Monotonic.measureTime(block).inMilliseconds.toLong() } actual fun isDebuggingEnabled(default: Boolean): Boolean {