From cb42501dda004c7fcf180d7e39f074178d63c7e6 Mon Sep 17 00:00:00 2001 From: olme04 Date: Mon, 6 Dec 2021 14:49:20 +0300 Subject: [PATCH] remove playground, publish check and interactions examples --- examples/interactions/build.gradle.kts | 32 ----- .../src/jvmMain/kotlin/MetadataExample.kt | 59 ---------- .../src/jvmMain/kotlin/ReconnectExample.kt | 99 ---------------- .../kotlin/ReconnectOnConnectFailExample.kt | 68 ----------- .../jvmMain/kotlin/RequestChannelExample.kt | 58 ---------- .../kotlin/RequestResponseErrorExample.kt | 46 -------- .../jvmMain/kotlin/RequestResponseExample.kt | 42 ------- .../jvmMain/kotlin/RequestStreamExample.kt | 51 -------- .../jvmMain/kotlin/ServerRequestExample.kt | 50 -------- .../src/jvmMain/kotlin/ServerSetupExample.kt | 89 -------------- .../interactions/src/jvmMain/kotlin/shared.kt | 28 ----- playground/build.gradle.kts | 62 ---------- playground/src/commonMain/kotlin/Metadata.kt | 109 ------------------ playground/src/commonMain/kotlin/Stub.kt | 57 --------- playground/src/commonMain/kotlin/TCP.kt | 33 ------ playground/src/commonMain/kotlin/WS.kt | 30 ----- playground/src/commonMain/kotlin/streams.kt | 50 -------- playground/src/jsMain/kotlin/WSApp.kt | 19 --- playground/src/jsMain/resources/index.html | 27 ----- playground/src/jvmMain/kotlin/TcpClientApp.kt | 19 --- playground/src/jvmMain/kotlin/TcpServerApp.kt | 27 ----- playground/src/jvmMain/kotlin/WSClientApp.kt | 19 --- playground/src/jvmMain/kotlin/WSServerApp.kt | 30 ----- playground/src/nativeMain/kotlin/TcpApp.kt | 24 ---- publish-check/build.gradle.kts | 88 -------------- publish-check/src/commonMain/kotlin/Stub.kt | 22 ---- .../src/commonTest/kotlin/StubTest.kt | 26 ----- settings.gradle.kts | 13 --- 28 files changed, 1277 deletions(-) delete mode 100644 examples/interactions/build.gradle.kts delete mode 100644 examples/interactions/src/jvmMain/kotlin/MetadataExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/ReconnectExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/ReconnectOnConnectFailExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/RequestChannelExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/RequestResponseErrorExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/RequestResponseExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/RequestStreamExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/ServerRequestExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/ServerSetupExample.kt delete mode 100644 examples/interactions/src/jvmMain/kotlin/shared.kt delete mode 100644 playground/build.gradle.kts delete mode 100644 playground/src/commonMain/kotlin/Metadata.kt delete mode 100644 playground/src/commonMain/kotlin/Stub.kt delete mode 100644 playground/src/commonMain/kotlin/TCP.kt delete mode 100644 playground/src/commonMain/kotlin/WS.kt delete mode 100644 playground/src/commonMain/kotlin/streams.kt delete mode 100644 playground/src/jsMain/kotlin/WSApp.kt delete mode 100644 playground/src/jsMain/resources/index.html delete mode 100644 playground/src/jvmMain/kotlin/TcpClientApp.kt delete mode 100644 playground/src/jvmMain/kotlin/TcpServerApp.kt delete mode 100644 playground/src/jvmMain/kotlin/WSClientApp.kt delete mode 100644 playground/src/jvmMain/kotlin/WSServerApp.kt delete mode 100644 playground/src/nativeMain/kotlin/TcpApp.kt delete mode 100644 publish-check/build.gradle.kts delete mode 100644 publish-check/src/commonMain/kotlin/Stub.kt delete mode 100644 publish-check/src/commonTest/kotlin/StubTest.kt diff --git a/examples/interactions/build.gradle.kts b/examples/interactions/build.gradle.kts deleted file mode 100644 index ba87d6db7..000000000 --- a/examples/interactions/build.gradle.kts +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -plugins { - kotlin("multiplatform") -} - -kotlin { - jvm() - - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":rsocket-core")) - implementation(project(":rsocket-transport-local")) - } - } - } -} diff --git a/examples/interactions/src/jvmMain/kotlin/MetadataExample.kt b/examples/interactions/src/jvmMain/kotlin/MetadataExample.kt deleted file mode 100644 index 29a04bf97..000000000 --- a/examples/interactions/src/jvmMain/kotlin/MetadataExample.kt +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.utils.io.core.* -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.metadata.* -import io.rsocket.kotlin.payload.* - -@OptIn(ExperimentalMetadataApi::class) -public fun main() { - val p1 = buildPayload { - data("Hello") - - metadata("some text") - } - - println("Case: 1") - println(p1.data.readText()) - println(p1.metadata?.readText()) - - val p2 = buildPayload { - data("Hello") - - metadata(RoutingMetadata("tag1", "tag2")) - } - - val tags = p2.metadata?.read(RoutingMetadata)?.tags.orEmpty() - println("Case: 2") - println(tags) - - - val p3 = buildPayload { - data("hello") - - compositeMetadata { - add(RoutingMetadata("tag3", "t4")) - add(RawMetadata(WellKnownMimeType.ApplicationJson, buildPacket { writeText("{s: 2}") })) - } - } - - val cm = p3.metadata!!.read(CompositeMetadata) - println("Case: 3") - println(cm[RoutingMetadata].tags) - println(cm[WellKnownMimeType.ApplicationJson].readText()) -} diff --git a/examples/interactions/src/jvmMain/kotlin/ReconnectExample.kt b/examples/interactions/src/jvmMain/kotlin/ReconnectExample.kt deleted file mode 100644 index 920e9396e..000000000 --- a/examples/interactions/src/jvmMain/kotlin/ReconnectExample.kt +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.utils.io.core.* -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.atomicfu.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* - -@TransportApi -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestStream { requestPayload -> - val data = requestPayload.data.readText() - val metadata = requestPayload.metadata?.readText() - println("Server received payload: data=$data, metadata=$metadata") - - flow { - repeat(50) { i -> - delay(100) - emit(Payload("Payload: $i", metadata)) - println("Server sent: $i") - } - } - } - } - } - - val rSocket = RSocketConnector { - //reconnect 10 times with 1 second delay if connection establishment failed - reconnectable(10) { - delay(1000) - true - } - }.connect(ClientTransport { - val connection = DisconnectableConnection(server.connect()) - launch { - delay(500) - connection.disconnect() //emulate connection fail - } - connection - }) - - //do request - try { - rSocket.requestStream(Payload("Hello", "World")).flowOn(PrefetchStrategy(3, 0)).collect { - val index = it.data.readText().substringAfter("Payload: ").toInt() - println("Client receives index: $index") - } - } catch (e: Throwable) { - println("Request failed with error: $e") - } - - //do request just after it - - rSocket.requestStream(Payload("Hello", "World")).flowOn(PrefetchStrategy(3, 0)).take(3).collect { - val index = it.data.readText().substringAfter("Payload: ").toInt() - println("Client receives index: $index after reconnection") - } - -} - -@TransportApi -private class DisconnectableConnection( - private val connection: Connection, -) : Connection by connection { - private val disconnected = atomic(false) - - fun disconnect() { - disconnected.value = true - } - - override suspend fun send(packet: ByteReadPacket) { - if (disconnected.value) error("Disconnected") - connection.send(packet) - } - - override suspend fun receive(): ByteReadPacket { - if (disconnected.value) error("Disconnected") - return connection.receive() - } -} diff --git a/examples/interactions/src/jvmMain/kotlin/ReconnectOnConnectFailExample.kt b/examples/interactions/src/jvmMain/kotlin/ReconnectOnConnectFailExample.kt deleted file mode 100644 index 05423acaa..000000000 --- a/examples/interactions/src/jvmMain/kotlin/ReconnectOnConnectFailExample.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* - -@TransportApi -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestStream { requestPayload -> - val data = requestPayload.data.readText() - val metadata = requestPayload.metadata?.readText() - println("Server received payload: data=$data, metadata=$metadata") - - flow { - repeat(50) { i -> - delay(100) - emit(Payload("Payload: $i", metadata)) - println("Server sent: $i") - } - } - } - } - } - - //emulate connection establishment error - var first = true - - val rSocket = RSocketConnector { - //reconnect 10 times with 1 second delay if connection establishment failed - reconnectable(10) { - delay(1000) - println("Retry after error: $it") - true - } - }.connect(ClientTransport { - if (first) { - first = false - error("Connection establishment failed") //emulate connection establishment error - } - server.connect() - }) - - //do request - rSocket.requestStream(Payload("Hello", "World")).flowOn(PrefetchStrategy(3, 0)).take(3).collect { - val index = it.data.readText().substringAfter("Payload: ").toInt() - println("Client receives index: $index") - } - -} diff --git a/examples/interactions/src/jvmMain/kotlin/RequestChannelExample.kt b/examples/interactions/src/jvmMain/kotlin/RequestChannelExample.kt deleted file mode 100644 index eb18dbc3b..000000000 --- a/examples/interactions/src/jvmMain/kotlin/RequestChannelExample.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* - - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestChannel { init, request -> - println("Init with: ${init.data.readText()}") - request.flowOn(PrefetchStrategy(3, 0)).take(3).flatMapConcat { payload -> - val data = payload.data.readText() - flow { - repeat(3) { - emit(Payload("$data(copy $it)")) - } - } - } - } - } - } - val rSocket = RSocketConnector().connect(server) - - val request = flow { - emit(Payload("Hello")) - println("Client: Hello") - emit(Payload("World")) - println("Client: World") - emit(Payload("Yes")) - println("Client: Yes") - emit(Payload("No")) - println("Client: No") //no print - } - - val response = rSocket.requestChannel(Payload("Init"), request) - response.collect { - val data = it.data.readText() - println("Client receives: $data") - } -} diff --git a/examples/interactions/src/jvmMain/kotlin/RequestResponseErrorExample.kt b/examples/interactions/src/jvmMain/kotlin/RequestResponseErrorExample.kt deleted file mode 100644 index c3789fade..000000000 --- a/examples/interactions/src/jvmMain/kotlin/RequestResponseErrorExample.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestResponse { - val data = it.data.readText() - if ("hello" in data) Payload("hello client") - else error("I don't understand you") - } - } - } - val rSocket = RSocketConnector().connect(server) - - val response = rSocket.requestResponse(Payload("hello server")) - - val data = response.data.readText() - - println("Client receive: $data") - - try { - rSocket.requestResponse(Payload("I'm client")) - } catch (e: Throwable) { - println("Client receive:") - e.printStackTrace() - } -} diff --git a/examples/interactions/src/jvmMain/kotlin/RequestResponseExample.kt b/examples/interactions/src/jvmMain/kotlin/RequestResponseExample.kt deleted file mode 100644 index 27a194c43..000000000 --- a/examples/interactions/src/jvmMain/kotlin/RequestResponseExample.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestResponse { - val data = it.data.readText() - val metadata = it.metadata?.readText() - println("Server received payload: data=$data, metadata=$metadata") - - Payload(data.repeat(3), "SERVER_METADATA") //response - } - } - } - val rSocket = RSocketConnector().connect(server) - - val response = rSocket.requestResponse(Payload("Hello", "World")) - - val data = response.data.readText() - val metadata = response.metadata?.readText() - - println("Client receives payload: data=$data, metadata=$metadata") -} diff --git a/examples/interactions/src/jvmMain/kotlin/RequestStreamExample.kt b/examples/interactions/src/jvmMain/kotlin/RequestStreamExample.kt deleted file mode 100644 index 8a36ee9a4..000000000 --- a/examples/interactions/src/jvmMain/kotlin/RequestStreamExample.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestStream { - val data = it.data.readText() - val metadata = it.metadata?.readText() - println("Server received payload: data=$data, metadata=$metadata") - - flow { - repeat(10) { i -> - emit(Payload("Payload: $i", metadata)) - println("Server sent: $i") - } - } - } - } - } - val rSocket = RSocketConnector().connect(server) - - val response = rSocket.requestStream(Payload("Hello", "World")) - - response - .flowOn(PrefetchStrategy(2, 0)) - .map { it.data.readText().substringAfter("Payload: ").toInt() } - .take(2) - .collect { - println("Client receives index: $it") - } -} diff --git a/examples/interactions/src/jvmMain/kotlin/ServerRequestExample.kt b/examples/interactions/src/jvmMain/kotlin/ServerRequestExample.kt deleted file mode 100644 index d085a2df9..000000000 --- a/examples/interactions/src/jvmMain/kotlin/ServerRequestExample.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - RSocketRequestHandler { - requestResponse { - val clientRequest = it.data.readText() - println("Server got from client request: $clientRequest") - val response = requester.requestResponse(Payload("What happens?")) - val clientResponse = response.data.readText() - println("Server got from client response: $clientResponse") - Payload("I'm frustrated because of `$clientResponse`") - } - } - } - val rSocket = RSocketConnector { - acceptor { - RSocketRequestHandler { - requestResponse { - val serverRequest = it.data.readText() - println("Client got from server request: $serverRequest") - Payload("I'm client!") - } - } - } - }.connect(server) - - val response = rSocket.requestResponse(Payload("How are you server?")) - val data = response.data.readText() - println("Result: $data") -} diff --git a/examples/interactions/src/jvmMain/kotlin/ServerSetupExample.kt b/examples/interactions/src/jvmMain/kotlin/ServerSetupExample.kt deleted file mode 100644 index 73060b42e..000000000 --- a/examples/interactions/src/jvmMain/kotlin/ServerSetupExample.kt +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.payload.* -import io.rsocket.kotlin.transport.local.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* - - -fun main(): Unit = runBlocking { - val server = RSocketServer().bindIn(this, LocalServerTransport()) { - val data = config.setupPayload.metadata?.readText() ?: error("Empty metadata") - RSocketRequestHandler { - when (data) { - "rr" -> requestResponse { - println("Server receive: ${it.data.readText()}") - Payload("From server") - } - "rs" -> requestStream { - println("Server receive: ${it.data.readText()}") - flowOf(Payload("From server")) - } - } - } - } - - suspend fun client1() { - val rSocketClient = RSocketConnector().connect(server) - rSocketClient.coroutineContext.job.join() - println("Client 1 canceled: ${rSocketClient.coroutineContext.job.isCancelled}") - try { - rSocketClient.requestResponse(Payload.Empty) - } catch (e: Throwable) { - println("Client 1 canceled after creation with: $e") - } - } - - suspend fun client2() { - val rSocketClient = RSocketConnector { - connectionConfig { - setupPayload { Payload("", "rr") } - } - }.connect(server) - - val payload = rSocketClient.requestResponse(Payload("2")) - println("Client 2 receives: ${payload.data.readText()}") - try { - rSocketClient.requestStream(Payload.Empty).collect() - } catch (e: Throwable) { - println("Client 2 receives error: ${e.message}") - } - } - - suspend fun client3() { - val rSocketClient = RSocketConnector { - connectionConfig { - setupPayload { Payload("", "rs") } - } - }.connect(server) - - val payloads = rSocketClient.requestStream(Payload("3")).toList() - println("Client 3 receives: ${payloads.map { it.data.readText() }}") - try { - rSocketClient.requestResponse(Payload.Empty) - } catch (e: Throwable) { - println("Client 3 receives error: ${e.message}") - } - } - - client1() - client2() - client3() - -} diff --git a/examples/interactions/src/jvmMain/kotlin/shared.kt b/examples/interactions/src/jvmMain/kotlin/shared.kt deleted file mode 100644 index 11bd4fdd4..000000000 --- a/examples/interactions/src/jvmMain/kotlin/shared.kt +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.utils.io.core.* -import io.rsocket.kotlin.payload.* - -/** - * Simple custom [Payload] factory function with string data and metadata. - * Has almost no overhead over call to [Payload] constructor with data and metadata as [ByteReadPacket]. - * Similar functions can be created for all needed use cases - */ -fun Payload(data: String, metadata: String? = null): Payload = buildPayload { - data(data) - if (metadata != null) metadata(metadata) -} diff --git a/playground/build.gradle.kts b/playground/build.gradle.kts deleted file mode 100644 index bd81ccd28..000000000 --- a/playground/build.gradle.kts +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import org.jetbrains.kotlin.konan.target.* - -plugins { - kotlin("multiplatform") -} - -val ktorVersion: String by rootProject - -kotlin { - jvm() - js(IR) { - browser { - binaries.executable() - } - } - when { - HostManager.hostIsLinux -> linuxX64("native") -// HostManager.hostIsMingw -> mingwX64("native") //no native support for TCP - HostManager.hostIsMac -> macosX64("native") - else -> null - }?.binaries { - executable { - entryPoint = "main" - } - } - - sourceSets { - val commonMain by getting { - dependencies { - implementation(project(":rsocket-core")) - implementation(project(":rsocket-transport-local")) - implementation(project(":rsocket-transport-ktor-client")) - - implementation("io.ktor:ktor-client-core:$ktorVersion") //for WS support - } - } - val jvmMain by getting { - dependencies { - implementation(project(":rsocket-transport-ktor-server")) - - implementation("io.ktor:ktor-client-cio:$ktorVersion") - implementation("io.ktor:ktor-server-cio:$ktorVersion") - } - } - } -} diff --git a/playground/src/commonMain/kotlin/Metadata.kt b/playground/src/commonMain/kotlin/Metadata.kt deleted file mode 100644 index 1b39431a5..000000000 --- a/playground/src/commonMain/kotlin/Metadata.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.utils.io.core.* -import io.rsocket.kotlin.* -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.metadata.* -import io.rsocket.kotlin.payload.* - -@OptIn(ExperimentalMetadataApi::class) -public fun metadata() { - - //writing - - val routing = RoutingMetadata("tag1", "route1", "something") - val tracing = ZipkinTracingMetadata( - kind = ZipkinTracingMetadata.Kind.Sample, - traceId = 123L, - spanId = 123L - ) - val cm1 = buildCompositeMetadata { - add(routing) - add(tracing) - } - // or - val cm2 = CompositeMetadata(routing, tracing) - - //all lambdas are inline, and don't create another objects for builders - //so no overhead comparing to using plain Payload(data, metadata) function - val payload = buildPayload { - data("Some data") - metadata(cm2) - // or - metadata(cm1) - // or - compositeMetadata { - add(routing) - add(tracing) - - add(WellKnownMimeType.ApplicationAvro, buildPacket { writeText("some custom metadata building") }) - //or - val raw = RawMetadata(WellKnownMimeType.ApplicationAvro, ByteReadPacket.Empty) - - add(raw) - } - } - - //reading - //property types are not needed, just for better online readability - val cm: CompositeMetadata = payload.metadata?.read(CompositeMetadata) ?: return - - val rmr = RawMetadata.reader(WellKnownMimeType.ApplicationAvro) - - - val rm: RoutingMetadata = cm.get(RoutingMetadata) - val tm: ZipkinTracingMetadata = cm.get(ZipkinTracingMetadata) - - //or - val rm1: RoutingMetadata = cm[RoutingMetadata] - val tm1: ZipkinTracingMetadata = cm[ZipkinTracingMetadata] - - //or - val rmNull: RoutingMetadata? = cm.getOrNull(RoutingMetadata) - val tmNull: ZipkinTracingMetadata? = cm.getOrNull(ZipkinTracingMetadata) - - //or - val rmList: List = cm.list(RoutingMetadata) //spec allow this - - //or - val c: Boolean = cm.contains(RoutingMetadata) - val c2: Boolean = RoutingMetadata in cm - - //or - - cm.entries.forEach { - if (it.hasMimeTypeOf(RoutingMetadata)) { - val rm2: RoutingMetadata = it.read(RoutingMetadata) - } - //or - val tm2: ZipkinTracingMetadata? = it.readOrNull(ZipkinTracingMetadata) - - - } - - //usage - - rm.tags.forEach { - println("tag: $it") - } - - tm.traceId - tm.traceIdHigh - - val span = "${tm.parentSpanId}-${tm.spanId}" - -} diff --git a/playground/src/commonMain/kotlin/Stub.kt b/playground/src/commonMain/kotlin/Stub.kt deleted file mode 100644 index a1c1c8ebe..000000000 --- a/playground/src/commonMain/kotlin/Stub.kt +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.utils.io.core.* -import io.rsocket.kotlin.* -import io.rsocket.kotlin.payload.* -import kotlinx.coroutines.* -import kotlinx.coroutines.flow.* -import kotlin.random.* - -val rSocketAcceptor: ConnectionAcceptor = ConnectionAcceptor { - RSocketRequestHandler { - requestResponse { - delay(Random.nextLong(1000, 3000)) - throw RSocketError.Invalid(it.toString()) - } - requestStream { - flow { - coroutineScope { - while (isActive) { - emit(it) - } - } - } - } - } -} - -suspend fun RSocket.doSomething() { - // launch { rSocket.requestResponse(Payload(byteArrayOf(1, 1, 1), byteArrayOf(2, 2, 2))) } -// launch { rSocket.fireAndForget(Payload(byteArrayOf(1, 1, 1), byteArrayOf(2, 2, 2))) } -// launch { rSocket.metadataPush(byteArrayOf(1, 2, 3)) } - var i = 0 - requestStream( - buildPayload { - data(byteArrayOf(1, 1, 1)) - metadata(byteArrayOf(2, 2, 2)) - } - ).flowOn(PrefetchStrategy(10000, 0)).collect { - println(it.data.readBytes().contentToString()) - if (++i == 10000) error("") - } -// launch { rSocket.requestChannel(RequestingFlow { emit(Payload(byteArrayOf(3, 3, 3), byteArrayOf(4, 4, 4))) }).collect() } -} diff --git a/playground/src/commonMain/kotlin/TCP.kt b/playground/src/commonMain/kotlin/TCP.kt deleted file mode 100644 index 2b6db3344..000000000 --- a/playground/src/commonMain/kotlin/TCP.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.payload.* -import io.rsocket.kotlin.transport.ktor.* - -suspend fun runTcpClient() { - val transport = TcpClientTransport("0.0.0.0", 4444) - RSocketConnector().connect(transport).doSomething() -} - -//to test nodejs tcp server -suspend fun testNodeJsServer() { - val transport = TcpClientTransport("127.0.0.1", 9000) - val client = RSocketConnector().connect(transport) - - val response = client.requestResponse(buildPayload { data("Hello from JVM") }) - println(response.data.readText()) -} diff --git a/playground/src/commonMain/kotlin/WS.kt b/playground/src/commonMain/kotlin/WS.kt deleted file mode 100644 index 6bf06201a..000000000 --- a/playground/src/commonMain/kotlin/WS.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.client.* -import io.ktor.client.engine.* -import io.ktor.client.features.websocket.* -import io.rsocket.kotlin.transport.ktor.client.* - -suspend fun runWSClient(engine: HttpClientEngineFactory<*>) { - val client = HttpClient(engine) { - install(WebSockets) - install(RSocketSupport) - } - - val rSocket = client.rSocket() - rSocket.doSomething() -} diff --git a/playground/src/commonMain/kotlin/streams.kt b/playground/src/commonMain/kotlin/streams.kt deleted file mode 100644 index 8e0a93a99..000000000 --- a/playground/src/commonMain/kotlin/streams.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import kotlinx.coroutines.* -import kotlinx.coroutines.channels.* -import kotlinx.coroutines.flow.* - -@ExperimentalStreamsApi -private suspend fun s() { - val flow = flow { - val strategy = currentCoroutineContext()[RequestStrategy]!!.provide() - var i = strategy.firstRequest() - println("INIT: $i") - var r = 0 - while (i > 0) { - emit(r++) - val n = strategy.nextRequest() - println("") - if (n > 0) i += n - i-- - } - } - - flow.flowOn(PrefetchStrategy(64, 16)).onEach { println(it) }.launchIn(GlobalScope) - - val ch = Channel() - - flow.flowOn(ChannelStrategy(ch)).onEach { println(it) }.launchIn(GlobalScope) - - delay(100) - ch.send(5) - delay(100) - ch.send(5) - delay(100) - ch.send(5) -} diff --git a/playground/src/jsMain/kotlin/WSApp.kt b/playground/src/jsMain/kotlin/WSApp.kt deleted file mode 100644 index 893b4820b..000000000 --- a/playground/src/jsMain/kotlin/WSApp.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.client.engine.js.* - -suspend fun main(): Unit = runWSClient(Js) diff --git a/playground/src/jsMain/resources/index.html b/playground/src/jsMain/resources/index.html deleted file mode 100644 index aaa9768d0..000000000 --- a/playground/src/jsMain/resources/index.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - Title - - - - - - diff --git a/playground/src/jvmMain/kotlin/TcpClientApp.kt b/playground/src/jvmMain/kotlin/TcpClientApp.kt deleted file mode 100644 index f1189def1..000000000 --- a/playground/src/jvmMain/kotlin/TcpClientApp.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -suspend fun main(): Unit = runTcpClient() - -//suspend fun main(): Unit = testNodeJsServer() diff --git a/playground/src/jvmMain/kotlin/TcpServerApp.kt b/playground/src/jvmMain/kotlin/TcpServerApp.kt deleted file mode 100644 index ec7ad96a0..000000000 --- a/playground/src/jvmMain/kotlin/TcpServerApp.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.core.* -import io.rsocket.kotlin.transport.ktor.* -import kotlinx.coroutines.* -import kotlin.coroutines.* - -suspend fun runTcpServer(dispatcher: CoroutineContext) { - val transport = TcpServerTransport("0.0.0.0", 4444) - RSocketServer().bindIn(CoroutineScope(dispatcher), transport, rSocketAcceptor).handlerJob.join() -} - -suspend fun main(): Unit = runTcpServer(Dispatchers.IO) diff --git a/playground/src/jvmMain/kotlin/WSClientApp.kt b/playground/src/jvmMain/kotlin/WSClientApp.kt deleted file mode 100644 index 5737b29b1..000000000 --- a/playground/src/jvmMain/kotlin/WSClientApp.kt +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.client.engine.cio.* - -suspend fun main(): Unit = runWSClient(CIO) diff --git a/playground/src/jvmMain/kotlin/WSServerApp.kt b/playground/src/jvmMain/kotlin/WSServerApp.kt deleted file mode 100644 index 94de39cc4..000000000 --- a/playground/src/jvmMain/kotlin/WSServerApp.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.ktor.application.* -import io.ktor.routing.* -import io.ktor.server.cio.* -import io.ktor.server.engine.* -import io.rsocket.kotlin.transport.ktor.server.* - -fun main() { - embeddedServer(CIO) { - install(RSocketSupport) - routing { - rSocket(acceptor = rSocketAcceptor) - } - }.start(true) -} diff --git a/playground/src/nativeMain/kotlin/TcpApp.kt b/playground/src/nativeMain/kotlin/TcpApp.kt deleted file mode 100644 index 184844af7..000000000 --- a/playground/src/nativeMain/kotlin/TcpApp.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import kotlinx.coroutines.* - -fun main() { - runBlocking { - runTcpClient() - } -} - diff --git a/publish-check/build.gradle.kts b/publish-check/build.gradle.kts deleted file mode 100644 index 15889bcd8..000000000 --- a/publish-check/build.gradle.kts +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -plugins { - kotlin("multiplatform") -} - -val publishCheckVersion: String by project - -kotlin { - //all targets depends on core and local transport - - jvm() //depends on ktor client and server - js(IR) { //depends on ktor client - browser() - nodejs() - } - - mingwX64() //depends only on common - val hostTargets = listOf(linuxX64(), macosX64()) - val iosTargets = listOf(iosArm32(), iosArm64(), iosX64()) - val tvosTargets = listOf(tvosArm64(), tvosX64()) - val watchosTargets = listOf(watchosArm32(), watchosArm64(), watchosX86()) - val nativeTargets = hostTargets + iosTargets + tvosTargets + watchosTargets //depends on ktor client - - sourceSets { - val commonMain by getting { - dependencies { - implementation("io.rsocket.kotlin:rsocket-core:$publishCheckVersion") - implementation("io.rsocket.kotlin:rsocket-transport-local:$publishCheckVersion") - - api(kotlin("test-common")) - api(kotlin("test-annotations-common")) - } - } - - val nonWinCommonMain by creating { - dependsOn(commonMain) - dependencies { - implementation("io.rsocket.kotlin:rsocket-transport-ktor:$publishCheckVersion") - } - } - - val clientMain by creating { - dependsOn(nonWinCommonMain) - dependencies { - implementation("io.rsocket.kotlin:rsocket-transport-ktor-client:$publishCheckVersion") - } - } - - val jsMain by getting { - dependsOn(clientMain) - dependencies { - api(kotlin("test-js")) - } - } - - val jvmMain by getting { - dependsOn(clientMain) - dependencies { - implementation("io.rsocket.kotlin:rsocket-transport-ktor-server:$publishCheckVersion") - - api(kotlin("test-junit")) - } - } - - val nativeMain by creating { - dependsOn(clientMain) - } - - nativeTargets.forEach { - sourceSets["${it.name}Main"].dependsOn(nativeMain) - } - } -} diff --git a/publish-check/src/commonMain/kotlin/Stub.kt b/publish-check/src/commonMain/kotlin/Stub.kt deleted file mode 100644 index 89647d161..000000000 --- a/publish-check/src/commonMain/kotlin/Stub.kt +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.* -import io.rsocket.kotlin.payload.* - -val rSocket = RSocketRequestHandler { - requestResponse { payload: Payload -> payload } -} diff --git a/publish-check/src/commonTest/kotlin/StubTest.kt b/publish-check/src/commonTest/kotlin/StubTest.kt deleted file mode 100644 index 5d109ea3e..000000000 --- a/publish-check/src/commonTest/kotlin/StubTest.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright 2015-2020 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. - */ - -import io.rsocket.kotlin.payload.* -import io.rsocket.kotlin.* -import kotlin.test.* - -class StubTest { - @Test - fun test() { - assertTrue(rSocket.isActive) - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 207278e2d..266f39be1 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -58,7 +58,6 @@ gradleEnterprise { rootProject.name = "rsocket-kotlin" include("benchmarks") -include("playground") include("rsocket-core") include("rsocket-test") @@ -72,15 +71,3 @@ include("rsocket-transport-ktor-client") include("rsocket-transport-ktor-server") project(":rsocket-transport-ktor-client").projectDir = file("rsocket-transport-ktor/rsocket-transport-ktor-client") project(":rsocket-transport-ktor-server").projectDir = file("rsocket-transport-ktor/rsocket-transport-ktor-server") - -fun includeExample(name: String) { - include("examples:$name") -} - -//TODO ignore for now, as `kotlinx-nodejs` isn't maintained now -//includeExample("nodejs-tcp-transport") -includeExample("interactions") -includeExample("multiplatform-chat") - -val publishCheckVersion: String? by settings -if (publishCheckVersion != null) include("publish-check")