From 3e9d28be315447754ee5d9de2a3f1af10f1dc5c0 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 26 May 2023 11:38:50 +0300 Subject: [PATCH] Update build tools --- build.gradle.kts | 2 +- gradle.properties | 2 +- kmath-complex/build.gradle.kts | 18 +----------------- kmath-core/build.gradle.kts | 17 +---------------- .../kscience/kmath/streaming/BufferFlow.kt | 2 ++ kmath-functions/build.gradle.kts | 18 ++---------------- kmath-memory/build.gradle.kts | 17 +---------------- 7 files changed, 9 insertions(+), 67 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index fb2f7d8c7..aed79909c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -72,7 +72,7 @@ ksciencePublish { "https://maven.pkg.jetbrains.space/spc/p/sci/maven" } ) - sonatype() + sonatype("https://oss.sonatype.org") } apiValidation.nonPublicMarkers.add("space.kscience.kmath.UnstableKMathAPI") diff --git a/gradle.properties b/gradle.properties index e33106c0c..fee75d428 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ kotlin.native.ignoreDisabledTargets=true org.gradle.configureondemand=true org.gradle.jvmargs=-Xmx4096m -toolsVersion=0.14.6-kotlin-1.8.20 +toolsVersion=0.14.8-kotlin-1.8.20 org.gradle.parallel=true diff --git a/kmath-complex/build.gradle.kts b/kmath-complex/build.gradle.kts index 0611e9aae..2f8c320cf 100644 --- a/kmath-complex/build.gradle.kts +++ b/kmath-complex/build.gradle.kts @@ -7,23 +7,7 @@ kscience { js() native() - wasm{ - browser { - testTask { - useKarma { - this.webpackConfig.experiments.add("topLevelAwait") - useChromeHeadless() - useConfigDirectory(project.projectDir.resolve("karma.config.d").resolve("wasm")) - } - } - } - } - - wasmTest{ - dependencies { - implementation(kotlin("test")) - } - } + wasm() dependencies { api(projects.kmathCore) diff --git a/kmath-core/build.gradle.kts b/kmath-core/build.gradle.kts index 8c622e8b0..2088e0159 100644 --- a/kmath-core/build.gradle.kts +++ b/kmath-core/build.gradle.kts @@ -6,22 +6,7 @@ kscience{ jvm() js() native() - wasm{ - browser { - testTask { - useKarma { - webpackConfig.experiments.add("topLevelAwait") - useChromeHeadless() - } - } - } - } - - wasmTest{ - dependencies { - implementation(kotlin("test")) - } - } + wasm() dependencies { api(projects.kmathMemory) diff --git a/kmath-coroutines/src/commonMain/kotlin/space/kscience/kmath/streaming/BufferFlow.kt b/kmath-coroutines/src/commonMain/kotlin/space/kscience/kmath/streaming/BufferFlow.kt index ccd329064..2cc8b8393 100644 --- a/kmath-coroutines/src/commonMain/kotlin/space/kscience/kmath/streaming/BufferFlow.kt +++ b/kmath-coroutines/src/commonMain/kotlin/space/kscience/kmath/streaming/BufferFlow.kt @@ -7,6 +7,7 @@ package space.kscience.kmath.streaming +import kotlinx.coroutines.ExperimentalCoroutinesApi import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.asFlow @@ -25,6 +26,7 @@ public fun Buffer.asFlow(): Flow = iterator().asFlow() /** * Flat map a [Flow] of [Buffer] into continuous [Flow] of elements */ +@OptIn(ExperimentalCoroutinesApi::class) public fun Flow>.spread(): Flow = flatMapConcat { it.asFlow() } /** diff --git a/kmath-functions/build.gradle.kts b/kmath-functions/build.gradle.kts index acabd1eb9..4ec52f5ee 100644 --- a/kmath-functions/build.gradle.kts +++ b/kmath-functions/build.gradle.kts @@ -7,23 +7,9 @@ kscience{ js() native() - wasm{ - browser { - testTask { - useKarma { - this.webpackConfig.experiments.add("topLevelAwait") - useChromeHeadless() - useConfigDirectory(project.projectDir.resolve("karma.config.d").resolve("wasm")) - } - } - } - } + wasm() + - wasmTest{ - dependencies { - implementation(kotlin("test")) - } - } dependencies { api(projects.kmathCore) diff --git a/kmath-memory/build.gradle.kts b/kmath-memory/build.gradle.kts index 8c1e63cb7..fe422f751 100644 --- a/kmath-memory/build.gradle.kts +++ b/kmath-memory/build.gradle.kts @@ -6,22 +6,7 @@ kscience { jvm() js() native() - wasm{ - browser { - testTask { - useKarma { - webpackConfig.experiments.add("topLevelAwait") - useChromeHeadless() - } - } - } - } - - wasmTest{ - dependencies { - implementation(kotlin("test")) - } - } + wasm() } readme {