From 65c696254408c960f3b83ce1f909b1cf69f9f526 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Fri, 26 May 2023 16:46:18 +0300 Subject: [PATCH] Update build tools --- build.gradle.kts | 2 +- gradle.properties | 6 +++--- .../space/kscience/kmath/ast/rendering/TestFeatures.kt | 2 +- .../kscience/kmath/internal/binaryen/index.binaryen.kt | 1 - kmath-complex/build.gradle.kts | 1 - kmath-memory/build.gradle.kts | 5 +++++ .../kotlin/space/kscience/kmath/memory/NativeMemory.kt | 4 ++++ 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index aed79909c..7dbe87445 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -15,7 +15,7 @@ allprojects { } group = "space.kscience" - version = "0.3.1" + version = "0.3.2-dev-1" } subprojects { diff --git a/gradle.properties b/gradle.properties index fee75d428..76f51c4af 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,8 +9,8 @@ kotlin.native.ignoreDisabledTargets=true org.gradle.configureondemand=true org.gradle.jvmargs=-Xmx4096m -toolsVersion=0.14.8-kotlin-1.8.20 - - org.gradle.parallel=true org.gradle.workers.max=4 + +toolsVersion=0.14.8-kotlin-1.9.0-Beta +#kscience.wasm.disabled=true \ No newline at end of file diff --git a/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt index 7b5ec5765..bb6d39204 100644 --- a/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt +++ b/kmath-ast/src/commonTest/kotlin/space/kscience/kmath/ast/rendering/TestFeatures.kt @@ -17,7 +17,7 @@ internal class TestFeatures { fun printNumeric() { val num = object : Number() { override fun toByte(): Byte = throw UnsupportedOperationException() - override fun toChar(): Char = throw UnsupportedOperationException() +// override fun toChar(): Char = throw UnsupportedOperationException() override fun toDouble(): Double = throw UnsupportedOperationException() override fun toFloat(): Float = throw UnsupportedOperationException() override fun toInt(): Int = throw UnsupportedOperationException() diff --git a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt index d907a12c9..f2e1aae83 100644 --- a/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt +++ b/kmath-ast/src/jsMain/kotlin/space/kscience/kmath/internal/binaryen/index.binaryen.kt @@ -8,7 +8,6 @@ "OVERRIDING_FINAL_MEMBER", "RETURN_TYPE_MISMATCH_ON_OVERRIDE", "CONFLICTING_OVERLOADS", - "NO_EXPLICIT_VISIBILITY_IN_API_MODE_WARNING", "PropertyName", "ClassName", ) diff --git a/kmath-complex/build.gradle.kts b/kmath-complex/build.gradle.kts index 2f8c320cf..3e8b3b75e 100644 --- a/kmath-complex/build.gradle.kts +++ b/kmath-complex/build.gradle.kts @@ -6,7 +6,6 @@ kscience { jvm() js() native() - wasm() dependencies { diff --git a/kmath-memory/build.gradle.kts b/kmath-memory/build.gradle.kts index fe422f751..63811d784 100644 --- a/kmath-memory/build.gradle.kts +++ b/kmath-memory/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootExtension + plugins { id("space.kscience.gradle.mpp") } @@ -15,3 +17,6 @@ readme { An API and basic implementation for arranging objects in a continuous memory block. """.trimIndent() } + +rootProject.the().versions.webpack.version = "5.76.2" +rootProject.the().nodeVersion = "20.2.0" diff --git a/kmath-memory/src/nativeMain/kotlin/space/kscience/kmath/memory/NativeMemory.kt b/kmath-memory/src/nativeMain/kotlin/space/kscience/kmath/memory/NativeMemory.kt index 32bc8d6a5..0ae3c7ebc 100644 --- a/kmath-memory/src/nativeMain/kotlin/space/kscience/kmath/memory/NativeMemory.kt +++ b/kmath-memory/src/nativeMain/kotlin/space/kscience/kmath/memory/NativeMemory.kt @@ -5,6 +5,8 @@ package space.kscience.kmath.memory +import kotlin.experimental.ExperimentalNativeApi + @PublishedApi internal class NativeMemory( val array: ByteArray, @@ -26,6 +28,7 @@ internal class NativeMemory( return NativeMemory(copy) } + @OptIn(ExperimentalNativeApi::class) private val reader: MemoryReader = object : MemoryReader { override val memory: Memory get() = this@NativeMemory @@ -48,6 +51,7 @@ internal class NativeMemory( override fun reader(): MemoryReader = reader + @OptIn(ExperimentalNativeApi::class) private val writer: MemoryWriter = object : MemoryWriter { override val memory: Memory get() = this@NativeMemory