diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 0030a4bb..99a2bef3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -33,7 +33,7 @@ jobs: fail-fast: false matrix: os: [ 'ubuntu-latest' ] - target: [ 'jvm', 'jvm11', 'jvm17', 'jvm21', 'js', 'native' ] + target: [ 'jvm', 'jvm11', 'jvm17', 'jvm21', 'jsAndWasm', 'native' ] include: - os: 'macos-latest' target: 'macos' @@ -49,8 +49,11 @@ jobs: - uses: actions/checkout@v4 - uses: ./.github/actions/setup-gradle - - run: ./gradlew ${{ matrix.target }}Test --continue - timeout-minutes: 30 + - if: ${{ matrix.os != 'windows-latest' }} + run: ./gradlew ${{ matrix.target }}Test --continue + + - if: ${{ matrix.os == 'windows-latest' }} + run: ./gradlew ${{ matrix.target }}Test --continue --max-workers=1 - if: always() && !cancelled() uses: actions/upload-artifact@v4 diff --git a/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts b/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts index b5eb9b7e..fe25fefe 100644 --- a/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts +++ b/build-logic/src/main/kotlin/rsocketbuild.multiplatform-base.gradle.kts @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.gradle.* import org.jetbrains.kotlin.gradle.plugin.* import org.jetbrains.kotlin.gradle.plugin.mpp.* import org.jetbrains.kotlin.gradle.targets.js.ir.* +import org.jetbrains.kotlin.gradle.targets.js.testing.* import org.jetbrains.kotlin.gradle.targets.jvm.* import org.jetbrains.kotlin.gradle.targets.jvm.tasks.* import org.jetbrains.kotlin.gradle.targets.native.tasks.* @@ -32,15 +33,23 @@ plugins { @OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { compilerOptions { - // because of INVISIBLE_REFERENCE suppression - will be removed after migration to kotlinx.io - if (project.name != "rsocket-test") { - allWarningsAsErrors.set(true) - } + allWarningsAsErrors.set(true) progressiveMode.set(true) freeCompilerArgs.add("-Xrender-internal-diagnostic-names") optIn.addAll(OptIns.ExperimentalSubclassOptIn) } + applyDefaultHierarchyTemplate { + common { + group("nonJvm") { + withJs() + withWasmJs() + withWasmWasi() + group("native") + } + } + } + sourceSets.configureEach { languageSettings { if (name.contains("test", ignoreCase = true)) { @@ -103,6 +112,12 @@ registerTestAggregationTask( targetFilter = { it.platformType == KotlinPlatformType.jvm } ) +registerTestAggregationTask( + name = "jsAndWasmTest", + taskDependencies = { tasks.withType() }, + targetFilter = { it.platformType == KotlinPlatformType.js || it.platformType == KotlinPlatformType.wasm } +) + registerTestAggregationTask( name = "nativeTest", taskDependencies = { tasks.withType().matching { it.enabled } }, diff --git a/build-logic/src/main/kotlin/rsocketbuild/targets.kt b/build-logic/src/main/kotlin/rsocketbuild/targets.kt index 3ef9d40e..ac5c8ae7 100644 --- a/build-logic/src/main/kotlin/rsocketbuild/targets.kt +++ b/build-logic/src/main/kotlin/rsocketbuild/targets.kt @@ -18,8 +18,17 @@ package rsocketbuild import org.gradle.jvm.toolchain.* import org.gradle.kotlin.dsl.* +import org.jetbrains.kotlin.gradle.* import org.jetbrains.kotlin.gradle.dsl.* +fun KotlinMultiplatformExtension.allTargets() { + jvmTarget() + jsTarget() + wasmJsTarget() + wasmWasiTarget() + nativeTargets() +} + fun KotlinMultiplatformExtension.appleTargets() { macosX64() macosArm64() @@ -32,29 +41,25 @@ fun KotlinMultiplatformExtension.appleTargets() { watchosArm32() watchosArm64() watchosSimulatorArm64() - // https://youtrack.jetbrains.com/issue/KTOR-6368, supported by kotlinx-io - // watchosDeviceArm64() + watchosDeviceArm64() tvosX64() tvosArm64() tvosSimulatorArm64() } -fun KotlinMultiplatformExtension.nixTargets() { +fun KotlinMultiplatformExtension.nativeTargets() { appleTargets() + linuxX64() linuxArm64() -} - -fun KotlinMultiplatformExtension.nativeTargets() { - nixTargets() mingwX64() - // not supported by ktor, supported by kotlinx-io - // androidNativeX64() - // androidNativeX86() - // androidNativeArm64() - // androidNativeArm32() +// TODO: there are some issues with androidNative targets with Kotlin 2.1.0 +// androidNativeX64() +// androidNativeX86() +// androidNativeArm64() +// androidNativeArm32() } fun KotlinMultiplatformExtension.jsTarget( @@ -67,6 +72,24 @@ fun KotlinMultiplatformExtension.jsTarget( } } +@OptIn(ExperimentalWasmDsl::class) +fun KotlinMultiplatformExtension.wasmJsTarget( + supportsNode: Boolean = true, + supportsBrowser: Boolean = true, +) { + wasmJs { + if (supportsNode) nodejs() + if (supportsBrowser) browser() + } +} + +@OptIn(ExperimentalWasmDsl::class) +fun KotlinMultiplatformExtension.wasmWasiTarget() { + wasmWasi { + nodejs() + } +} + fun KotlinMultiplatformExtension.jvmTarget( jdkVersion: Int = 8, jdkAdditionalTestVersions: Set = setOf(11, 17, 21), diff --git a/ktor-plugins/ktor-client-rsocket/build.gradle.kts b/ktor-plugins/ktor-client-rsocket/build.gradle.kts index 9d9b43f8..2122bd12 100644 --- a/ktor-plugins/ktor-client-rsocket/build.gradle.kts +++ b/ktor-plugins/ktor-client-rsocket/build.gradle.kts @@ -25,6 +25,7 @@ description = "rsocket-kotlin ktor client plugin" kotlin { jvmTarget() jsTarget() + wasmJsTarget() nativeTargets() sourceSets { diff --git a/ktor-plugins/ktor-server-rsocket/build.gradle.kts b/ktor-plugins/ktor-server-rsocket/build.gradle.kts index 7ebb510e..a7681fc5 100644 --- a/ktor-plugins/ktor-server-rsocket/build.gradle.kts +++ b/ktor-plugins/ktor-server-rsocket/build.gradle.kts @@ -24,7 +24,7 @@ description = "rsocket-kotlin ktor server plugin" kotlin { jvmTarget() - nixTargets() + nativeTargets() sourceSets { commonMain.dependencies { diff --git a/ktor-plugins/rsocket-ktor-client/build.gradle.kts b/ktor-plugins/rsocket-ktor-client/build.gradle.kts index 3312f542..5bbe92fe 100644 --- a/ktor-plugins/rsocket-ktor-client/build.gradle.kts +++ b/ktor-plugins/rsocket-ktor-client/build.gradle.kts @@ -25,6 +25,7 @@ description = "OLD ARTIFACT - migrate to ktor-client-rsocket" kotlin { jvmTarget() jsTarget() + wasmJsTarget() nativeTargets() sourceSets { diff --git a/ktor-plugins/rsocket-ktor-server/build.gradle.kts b/ktor-plugins/rsocket-ktor-server/build.gradle.kts index a7aeeba4..163b803f 100644 --- a/ktor-plugins/rsocket-ktor-server/build.gradle.kts +++ b/ktor-plugins/rsocket-ktor-server/build.gradle.kts @@ -24,7 +24,7 @@ description = "OLD ARTIFACT - migrate to ktor-server-rsocket" kotlin { jvmTarget() - nixTargets() + nativeTargets() sourceSets { commonMain.dependencies { diff --git a/rsocket-core/build.gradle.kts b/rsocket-core/build.gradle.kts index 87aa8634..dbdf05ef 100644 --- a/rsocket-core/build.gradle.kts +++ b/rsocket-core/build.gradle.kts @@ -24,9 +24,7 @@ plugins { description = "rsocket-kotlin core functionality" kotlin { - jvmTarget() - jsTarget() - nativeTargets() + allTargets() sourceSets { commonMain.dependencies { diff --git a/rsocket-core/src/jsMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt b/rsocket-core/src/jsMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt deleted file mode 100644 index dcde87bc..00000000 --- a/rsocket-core/src/jsMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2015-2022 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package io.rsocket.kotlin.logging - -import io.rsocket.kotlin.* - -@RSocketLoggingApi -internal actual val DefaultLoggerFactory: LoggerFactory - get() = ConsoleLogger - -@RSocketLoggingApi -public class ConsoleLogger( - override val tag: String, - private val minLevel: LoggingLevel = LoggingLevel.INFO, -) : Logger { - override fun isLoggable(level: LoggingLevel): Boolean = level >= minLevel - override fun rawLog(level: LoggingLevel, throwable: Throwable?, message: Any?) { - val meta = "[$level] ($tag)" - when (level) { - LoggingLevel.ERROR -> throwable - ?.let { console.error(meta, message, "Error:", it) } - ?: console.error(meta, message) - LoggingLevel.WARN -> throwable - ?.let { console.warn(meta, message, "Error:", it) } - ?: console.warn(meta, message) - LoggingLevel.INFO -> throwable - ?.let { console.info(meta, message, "Error:", it) } - ?: console.info(meta, message) - LoggingLevel.DEBUG -> throwable - ?.let { console.log(meta, message, "Error:", it) } - ?: console.log(meta, message) - LoggingLevel.TRACE -> throwable - ?.let { console.log(meta, message, "Error:", it) } - ?: console.log(meta, message) - } - } - - public companion object : LoggerFactory { - override fun logger(tag: String): Logger = ConsoleLogger(tag) - - public fun withLevel(minLevel: LoggingLevel): LoggerFactory = LoggerFactory { ConsoleLogger(it, minLevel) } - } -} diff --git a/rsocket-core/src/nativeMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt b/rsocket-core/src/nonJvmMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt similarity index 85% rename from rsocket-core/src/nativeMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt rename to rsocket-core/src/nonJvmMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt index d234e402..ce8db463 100644 --- a/rsocket-core/src/nativeMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt +++ b/rsocket-core/src/nonJvmMain/kotlin/io/rsocket/kotlin/logging/DefaultLoggerFactory.kt @@ -1,5 +1,5 @@ /* - * Copyright 2015-2022 the original author or authors. + * Copyright 2015-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,5 +19,5 @@ package io.rsocket.kotlin.logging import io.rsocket.kotlin.* @RSocketLoggingApi -public actual val DefaultLoggerFactory: LoggerFactory +internal actual val DefaultLoggerFactory: LoggerFactory get() = PrintLogger diff --git a/rsocket-internal-io/build.gradle.kts b/rsocket-internal-io/build.gradle.kts index 7211178b..4e1e4892 100644 --- a/rsocket-internal-io/build.gradle.kts +++ b/rsocket-internal-io/build.gradle.kts @@ -23,9 +23,7 @@ plugins { description = "rsocket-kotlin internal IO support" kotlin { - jvmTarget() - jsTarget() - nativeTargets() + allTargets() sourceSets { commonMain.dependencies { diff --git a/rsocket-test/build.gradle.kts b/rsocket-test/build.gradle.kts index f15aebc9..c54fc308 100644 --- a/rsocket-test/build.gradle.kts +++ b/rsocket-test/build.gradle.kts @@ -24,9 +24,7 @@ plugins { @OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { - jvmTarget() - jsTarget() - nativeTargets() + allTargets() compilerOptions { freeCompilerArgs.add("-Xexpect-actual-classes") diff --git a/rsocket-test/src/wasmJsMain/kotlin/io/rsocket/kotlin/test/Test.kt b/rsocket-test/src/wasmJsMain/kotlin/io/rsocket/kotlin/test/Test.kt new file mode 100644 index 00000000..e31d889c --- /dev/null +++ b/rsocket-test/src/wasmJsMain/kotlin/io/rsocket/kotlin/test/Test.kt @@ -0,0 +1,27 @@ +/* + * Copyright 2015-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.rsocket.kotlin.test + +import kotlinx.coroutines.* + +actual annotation class IgnoreJs +actual annotation class IgnoreJvm +actual annotation class IgnoreNative + +actual val anotherDispatcher: CoroutineDispatcher get() = Dispatchers.Default + +actual fun identityHashCode(instance: Any): Int = instance.hashCode() diff --git a/rsocket-test/src/wasmWasiMain/kotlin/io/rsocket/kotlin/test/Test.kt b/rsocket-test/src/wasmWasiMain/kotlin/io/rsocket/kotlin/test/Test.kt new file mode 100644 index 00000000..e31d889c --- /dev/null +++ b/rsocket-test/src/wasmWasiMain/kotlin/io/rsocket/kotlin/test/Test.kt @@ -0,0 +1,27 @@ +/* + * Copyright 2015-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package io.rsocket.kotlin.test + +import kotlinx.coroutines.* + +actual annotation class IgnoreJs +actual annotation class IgnoreJvm +actual annotation class IgnoreNative + +actual val anotherDispatcher: CoroutineDispatcher get() = Dispatchers.Default + +actual fun identityHashCode(instance: Any): Int = instance.hashCode() diff --git a/rsocket-transport-tests/build.gradle.kts b/rsocket-transport-tests/build.gradle.kts index a2353b56..142b8954 100644 --- a/rsocket-transport-tests/build.gradle.kts +++ b/rsocket-transport-tests/build.gradle.kts @@ -24,9 +24,7 @@ plugins { @OptIn(ExperimentalKotlinGradlePluginApi::class) kotlin { - jvmTarget() - jsTarget() - nativeTargets() + allTargets() compilerOptions { optIn.addAll( diff --git a/rsocket-transport-tests/src/commonMain/kotlin/io/rsocket/kotlin/transport/tests/TransportTest.kt b/rsocket-transport-tests/src/commonMain/kotlin/io/rsocket/kotlin/transport/tests/TransportTest.kt index 59b9fa05..2375ed75 100644 --- a/rsocket-transport-tests/src/commonMain/kotlin/io/rsocket/kotlin/transport/tests/TransportTest.kt +++ b/rsocket-transport-tests/src/commonMain/kotlin/io/rsocket/kotlin/transport/tests/TransportTest.kt @@ -32,7 +32,7 @@ import kotlin.time.Duration.Companion.seconds //TODO: need to somehow rework those tests, as now they are super flaky abstract class TransportTest : SuspendTest { - override val testTimeout: Duration = 3.minutes + override val testTimeout: Duration = 10.minutes private val testJob = SupervisorJob() protected val testContext = testJob + TestExceptionHandler @@ -121,7 +121,7 @@ abstract class TransportTest : SuspendTest { } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestChannel20000() = test { val request = flow { repeat(20_000) { emit(payload(7)) } @@ -134,7 +134,7 @@ abstract class TransportTest : SuspendTest { } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestChannel200000() = test { val request = flow { repeat(200_000) { emit(payload(it)) } @@ -148,7 +148,7 @@ abstract class TransportTest : SuspendTest { } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestChannel16x256() = test { val request = flow { repeat(256) { @@ -164,7 +164,7 @@ abstract class TransportTest : SuspendTest { } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestChannel256x512() = test { val request = flow { repeat(512) { @@ -180,7 +180,7 @@ abstract class TransportTest : SuspendTest { } @Test - @IgnoreNative // slow test + //@IgnoreNative // slow test fun requestStreamX16() = test { (0..16).map { async { @@ -191,7 +191,7 @@ abstract class TransportTest : SuspendTest { } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestStreamX256() = test { (0..256).map { async { @@ -202,7 +202,7 @@ abstract class TransportTest : SuspendTest { } @Test - @IgnoreNative //flaky, ignore for now + //@IgnoreNative //flaky, ignore for now fun requestChannel500NoLeak() = test { val request = flow { repeat(10_000) { emitOrClose(payload(3)) } @@ -241,13 +241,13 @@ abstract class TransportTest : SuspendTest { } @Test - @IgnoreNative //flaky, ignore for now + //@IgnoreNative //flaky, ignore for now fun requestResponse10000() = test { (1..10000).map { async { client.requestResponse(payload(3)).let(Companion::checkPayload) } }.awaitAll() } @Test - @Ignore //flaky, ignore for now + //@Ignore //flaky, ignore for now fun requestResponse100000() = test { repeat(100000) { client.requestResponse(payload(3)).let(Companion::checkPayload) } } @@ -260,14 +260,14 @@ abstract class TransportTest : SuspendTest { } @Test - @IgnoreNative + //@IgnoreNative fun requestStream8K() = test { val count = client.requestStream(payload(3)).onEach { checkPayload(it) }.count() assertEquals(8192, count) // TODO } @Test - @IgnoreNative + //@IgnoreNative fun requestStream500NoLeak() = test { val count = client diff --git a/rsocket-transports/ktor-tcp/build.gradle.kts b/rsocket-transports/ktor-tcp/build.gradle.kts index 7c4cf76d..d6fe6549 100644 --- a/rsocket-transports/ktor-tcp/build.gradle.kts +++ b/rsocket-transports/ktor-tcp/build.gradle.kts @@ -24,7 +24,7 @@ description = "rsocket-kotlin ktor TCP client/server transport implementation" kotlin { jvmTarget() - nixTargets() + nativeTargets() sourceSets { commonMain.dependencies { diff --git a/rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp/KtorTcpConnection.kt b/rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp/KtorTcpConnection.kt index a07d44e3..ccc08958 100644 --- a/rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp/KtorTcpConnection.kt +++ b/rsocket-transports/ktor-tcp/src/commonMain/kotlin/io/rsocket/kotlin/transport/ktor/tcp/KtorTcpConnection.kt @@ -92,9 +92,10 @@ private class KtorTcpConnection( } @OptIn(InternalAPI::class) -private fun ByteWriteChannel.writeFrame(frame: Buffer) { +private suspend fun ByteWriteChannel.writeFrame(frame: Buffer) { writeBuffer.writeInt24(frame.size.toInt()) writeBuffer.transferFrom(frame) + flushIfNeeded() } @OptIn(InternalAPI::class) diff --git a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt index 732768b7..005f7811 100644 --- a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt +++ b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpServerTest.kt @@ -25,7 +25,7 @@ import kotlin.test.* class TcpServerTest : SuspendTest { private val testJob = Job() private val testContext = testJob + TestExceptionHandler - private val serverTransport = KtorTcpServerTransport(testContext).target() + private val serverTransport = KtorTcpServerTransport(testContext).target("127.0.0.1") private fun KtorTcpServerInstance.clientTransport() = KtorTcpClientTransport(testContext).target(localAddress) diff --git a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt index 72682ce3..1b2e9e1a 100644 --- a/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt +++ b/rsocket-transports/ktor-tcp/src/commonTest/kotlin/io/rsocket/kotlin/transport/ktor/tcp/TcpTransportTest.kt @@ -24,7 +24,7 @@ import kotlinx.coroutines.* @Suppress("DEPRECATION_ERROR") class TcpTransportTest : TransportTest() { override suspend fun before() { - val serverSocket = startServer(TcpServerTransport()).serverSocket.await() + val serverSocket = startServer(TcpServerTransport("127.0.0.1")).serverSocket.await() client = connectClient(TcpClientTransport(serverSocket.localAddress as InetSocketAddress, testContext)) } } @@ -36,7 +36,7 @@ class KtorTcpTransportTest : TransportTest() { override suspend fun before() { val server = startServer(KtorTcpServerTransport(testContext) { selectorManager(selector, false) - }.target()) + }.target("127.0.0.1")) client = connectClient(KtorTcpClientTransport(testContext) { selectorManager(selector, false) }.target(server.localAddress)) diff --git a/rsocket-transports/ktor-websocket-client/build.gradle.kts b/rsocket-transports/ktor-websocket-client/build.gradle.kts index f9bcbf6a..7aae725b 100644 --- a/rsocket-transports/ktor-websocket-client/build.gradle.kts +++ b/rsocket-transports/ktor-websocket-client/build.gradle.kts @@ -25,6 +25,7 @@ description = "rsocket-kotlin ktor WebSocket client transport implementation" kotlin { jvmTarget() jsTarget() + wasmJsTarget() nativeTargets() sourceSets { diff --git a/rsocket-transports/ktor-websocket-internal/build.gradle.kts b/rsocket-transports/ktor-websocket-internal/build.gradle.kts index c3583f62..42aeb76d 100644 --- a/rsocket-transports/ktor-websocket-internal/build.gradle.kts +++ b/rsocket-transports/ktor-websocket-internal/build.gradle.kts @@ -25,6 +25,7 @@ description = "rsocket-kotlin ktor WebSocket transport utilities" kotlin { jvmTarget() jsTarget() + wasmJsTarget() nativeTargets() sourceSets { diff --git a/rsocket-transports/ktor-websocket-server/build.gradle.kts b/rsocket-transports/ktor-websocket-server/build.gradle.kts index ae436493..0f7ad5b1 100644 --- a/rsocket-transports/ktor-websocket-server/build.gradle.kts +++ b/rsocket-transports/ktor-websocket-server/build.gradle.kts @@ -24,7 +24,7 @@ description = "rsocket-kotlin ktor WebSocket server transport implementation" kotlin { jvmTarget() - nixTargets() + nativeTargets() sourceSets { commonMain.dependencies { diff --git a/rsocket-transports/local/build.gradle.kts b/rsocket-transports/local/build.gradle.kts index f1755711..7f52357a 100644 --- a/rsocket-transports/local/build.gradle.kts +++ b/rsocket-transports/local/build.gradle.kts @@ -24,9 +24,7 @@ plugins { description = "rsocket-kotlin Local transport implementation" kotlin { - jvmTarget() - jsTarget() - nativeTargets() + allTargets() sourceSets { commonMain.dependencies {