diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 5b32cfe48..382e1a045 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -20,7 +20,7 @@ env:
ALGOLIA_INDEX_NAME: 'prod_kotlin_rpc'
ALGOLIA_KEY: '${{ secrets.ALGOLIA_KEY }}'
CONFIG_JSON_PRODUCT: 'kotlinx-rpc'
- CONFIG_JSON_VERSION: '0.2.4'
+ CONFIG_JSON_VERSION: '0.3.0'
jobs:
build:
diff --git a/.gitignore b/.gitignore
index 5e1bc92b5..348ab60e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,6 +20,8 @@ build
!.idea/detekt.xml
!.idea/kotlinTestDataPluginTestDataPaths.xml
+samples/**/.idea/*
+
.DS_Store
# Ignore generated Detekt reports
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3a32aad94..5183a65a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,45 @@
+# 0.3.0
+> Published 1 October 2024
+
+### Features ๐
+* Wasm Support by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/190
+
+### Breaking Changes ๐ด
+* Move kRPC declarations from core by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/186
+
+### Bug fixes ๐
+* Fix kotlin/js code and samples by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/179
+* Fix regression of nested declarations in RPC interfaces by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/181
+
+### Documentation ๐
+* Wording fixes by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/175
+
+### Infra ๐ง
+* Infra enhancements by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/206
+* Fixed Wasm Publication by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/208
+* Update renovate configs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/185
+* Configure JPMS checks by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/187
+* Update some ide configs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/188
+* Added Gradle Doctor to the build by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/189
+* Added build cache and develocity plugin by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/192
+* Support variable Kotlin and project versions by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/201
+* Update renovate and some deps by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/198
+
+### Other Changes ๐งน
+* Bump version to 0.3.0-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/174
+* Fix compiler tests after #172 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/180
+* Remove unused and inactive annotation by @kez-lab in https://github.com/Kotlin/kotlinx-rpc/pull/182
+* Use built-in JsClass getter by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/184
+* Update actions/configure-pages action to v5 by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/200
+* Update Samples dependencies by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/199
+* Update Core dependencies (non-major) by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/194
+* Update Core dependencies (non-major) by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/205
+
+## New Contributors
+* @kez-lab made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/182
+
+**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.2.4...0.3.0
+
# 0.2.4
> Published 20 August 2024
diff --git a/README.md b/README.md
index eb0446796..fc95c9d1f 100644
--- a/README.md
+++ b/README.md
@@ -92,7 +92,7 @@ Example of plugins setup in a project's `build.gradle.kts`:
plugins {
kotlin("jvm") version "2.0.10"
kotlin("plugin.serialization") version "2.0.10"
- id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4"
+ id("org.jetbrains.kotlinx.rpc.plugin") version "0.3.0"
}
```
@@ -106,7 +106,7 @@ plugins {
kotlin("jvm") version "1.9.25"
kotlin("plugin.serialization") version "1.9.25"
id("com.google.devtools.ksp") version "1.9.25-1.0.20"
- id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4"
+ id("org.jetbrains.kotlinx.rpc.plugin") version "0.3.0"
}
```
### Runtime dependencies
@@ -166,11 +166,11 @@ based on the project's Kotlin version:
```kotlin
plugins {
kotlin("jvm") version "2.0.10"
- id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4"
+ id("org.jetbrains.kotlinx.rpc.plugin") version "0.3.0"
}
dependencies {
- // version 0.2.4 is set by the Gradle plugin
+ // version 0.3.0 is set by the Gradle plugin
implementation("org.jetbrains.kotlinx:kotlinx-rpc-core")
}
```
diff --git a/docs/pages/kotlinx-rpc/help-versions.json b/docs/pages/kotlinx-rpc/help-versions.json
index 0d021e7f2..aefc80e92 100644
--- a/docs/pages/kotlinx-rpc/help-versions.json
+++ b/docs/pages/kotlinx-rpc/help-versions.json
@@ -1,3 +1,3 @@
[
- {"version":"0.2.4","url":"/kotlinx-rpc/0.2.4/","isCurrent":true}
+ {"version":"0.3.0","url":"/kotlinx-rpc/0.3.0/","isCurrent":true}
]
diff --git a/docs/pages/kotlinx-rpc/rpc.tree b/docs/pages/kotlinx-rpc/rpc.tree
index 034df82ae..23ab1e140 100644
--- a/docs/pages/kotlinx-rpc/rpc.tree
+++ b/docs/pages/kotlinx-rpc/rpc.tree
@@ -26,6 +26,7 @@
+
diff --git a/docs/pages/kotlinx-rpc/topics/0-2-4.topic b/docs/pages/kotlinx-rpc/topics/0-2-4.topic
index 5200e14a3..ade09457d 100644
--- a/docs/pages/kotlinx-rpc/topics/0-2-4.topic
+++ b/docs/pages/kotlinx-rpc/topics/0-2-4.topic
@@ -10,7 +10,7 @@
title="Migration to 0.2.4" id="0-2-4">
- Version 0.2.4
does introduce any breaking changes.
+ Version 0.2.4
does not introduce any breaking changes.
However, it includes some updates that may require additional modifications in user projects.
diff --git a/docs/pages/kotlinx-rpc/topics/0-3-0.topic b/docs/pages/kotlinx-rpc/topics/0-3-0.topic
new file mode 100644
index 000000000..9b148744d
--- /dev/null
+++ b/docs/pages/kotlinx-rpc/topics/0-3-0.topic
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+ Version 0.3.0
introduces breaking changes.
+
+
+ This release resolves the issue of kRPC declarations being incorrectly included in non-kRPC artifacts.
+ All package names have been reviewed and updated to match artifact names and ensure uniqueness across the project.
+ All APIs were moved permanently without a deprecation cycle due to the size of the change.
+ The table below contains the full list of the changes.
+ Removed declarations
+
+
+ 0.2.4
+ 0.3.0
+
+
+ kotlinx.rpc.client.withService
+ Removed (was deprecated in 0.2.4)
+
+
+ kotlinx.rpc.client.awaitFieldInitialization
+ Removed (was deprecated in 0.2.4)
+
+
+ kotlinx.rpc.client.UninitializedRPCFieldException
+ Removed (was deprecated in 0.2.4)
+
+
+ Declarations that changed the artifact location and package
+
+
+ 0.2.4
+ 0.3.0
+
+
+
+ kotlinx.rpc.RPCConfig
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.RPCConfig
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.RPCConfigBuilder
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.RPCConfigBuilder
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.rpcClientConfig
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.rpcClientConfig
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.rpcServerConfig
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.rpcServerConfig
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.RPCTransport
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.RPCTransport
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.RPCTransportMessage
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.RPCTransportMessage
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.invokeOnStreamScopeCompletion
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.invokeOnStreamScopeCompletion
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+
+ kotlinx.rpc.streamScoped
+ Artifact: kotlinx-rpc-core
+
+
+ kotlinx.rpc.krpc.streamScoped
+ Artifact: kotlinx-rpc-krpc-core
+
+
+
+ Declarations that only changed the package
+
+
+ 0.2.4
+ 0.3.0
+
+
+
+ kotlinx.rpc.client.KRPCClient
+
+
+ kotlinx.rpc.krpc.client.KRPCClient
+
+
+
+
+ kotlinx.rpc.client.withService
+
+
+ kotlinx.rpc.krpc.client.withService
+
+
+
+
+ kotlinx.rpc.transport.ktor.client.rpc
+
+
+ kotlinx.rpc.krpc.ktor.client.rpc
+
+
+
+
+ kotlinx.rpc.transport.ktor.client.KtorRPCClient
+
+
+ kotlinx.rpc.krpc.ktor.client.KtorRPCClient
+
+
+
+
+ kotlinx.rpc.transport.ktor.client.RPC
+
+
+ kotlinx.rpc.krpc.ktor.client.RPC
+
+
+
+
+ kotlinx.rpc.transport.ktor.server.RPC
+
+
+ kotlinx.rpc.krpc.ktor.server.RPC
+
+
+
+
+ kotlinx.rpc.transport.ktor.server.rpc
+
+
+ kotlinx.rpc.krpc.ktor.server.rpc
+
+
+
+
+ kotlinx.rpc.transport.ktor.server.RPCRoute
+
+
+ kotlinx.rpc.krpc.ktor.server.RPCRoute
+
+
+
+
+ kotlinx.rpc.serialization.cbor
+
+
+ kotlinx.rpc.krpc.serialization.cbor.cbor
+
+
+
+
+ kotlinx.rpc.serialization.json
+
+
+ kotlinx.rpc.krpc.serialization.json.json
+
+
+
+
+ kotlinx.rpc.serialization.protobuf
+
+
+ kotlinx.rpc.krpc.serialization.protobuf.protobuf
+
+
+
+
+ kotlinx.rpc.serialization.RPCSerialFormat
+
+
+ kotlinx.rpc.krpc.serialization.RPCSerialFormat
+
+
+
+
+ kotlinx.rpc.serialization.RPCSerialFormatBuilder
+
+
+ kotlinx.rpc.krpc.serialization.RPCSerialFormatBuilder
+
+
+
+
+ kotlinx.rpc.serialization.RPCSerialFormatConfiguration
+
+
+ kotlinx.rpc.krpc.serialization.RPCSerialFormatConfiguration
+
+
+
+
+ kotlinx.rpc.server.KRPCServer
+
+
+ kotlinx.rpc.krpc.server.KRPCServer
+
+
+
+
+
diff --git a/docs/pages/kotlinx-rpc/v.list b/docs/pages/kotlinx-rpc/v.list
index 77e277ce3..1897ccfc9 100644
--- a/docs/pages/kotlinx-rpc/v.list
+++ b/docs/pages/kotlinx-rpc/v.list
@@ -14,7 +14,7 @@
-
+
diff --git a/docs/pages/kotlinx-rpc/writerside.cfg b/docs/pages/kotlinx-rpc/writerside.cfg
index 6469bf236..2fc05fd86 100644
--- a/docs/pages/kotlinx-rpc/writerside.cfg
+++ b/docs/pages/kotlinx-rpc/writerside.cfg
@@ -12,5 +12,5 @@
-
-
\ No newline at end of file
+
+
diff --git a/gradle-conventions-settings/develocity/src/main/kotlin/conventions-develocity.settings.gradle.kts b/gradle-conventions-settings/develocity/src/main/kotlin/conventions-develocity.settings.gradle.kts
index 6e68c49a7..89f7bd273 100644
--- a/gradle-conventions-settings/develocity/src/main/kotlin/conventions-develocity.settings.gradle.kts
+++ b/gradle-conventions-settings/develocity/src/main/kotlin/conventions-develocity.settings.gradle.kts
@@ -13,10 +13,10 @@ develocity {
val startParameter = gradle.startParameter
val scanJournal = File(settingsDir, "scan-journal.log")
- server = DEVELOCITY_SERVER
+ server.set(DEVELOCITY_SERVER)
buildScan {
- uploadInBackground = !isCIRun
+ uploadInBackground.set(!isCIRun)
// obfuscate NIC since we don't want to expose user real IP (will be relevant without VPN)
obfuscation {
@@ -24,7 +24,7 @@ develocity {
}
capture {
- fileFingerprints = true
+ fileFingerprints.set(true)
}
buildScanPublished {
diff --git a/gradle-conventions-settings/empty/build.gradle.kts b/gradle-conventions-settings/empty/build.gradle.kts
new file mode 100644
index 000000000..531de275e
--- /dev/null
+++ b/gradle-conventions-settings/empty/build.gradle.kts
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
+ */
+
+import java.io.File
+import java.nio.file.Files
+import java.nio.file.Path
+
+plugins {
+ alias(libs.plugins.gradle.kotlin.dsl)
+}
+
+fun Path.name() = fileName?.toString().orEmpty()
+
+fun filterDirectory(sourceSetPath: Path, filter: (Path) -> Boolean): List {
+ return Files.newDirectoryStream(sourceSetPath).use { it.toList() }.filter(filter).map { it.toFile() }
+}
+
+val pluginsSource: Path = layout.projectDirectory.dir("../develocity/src/main/kotlin").asFile.toPath()
+
+val plugins = filterDirectory(pluginsSource) {
+ Files.isRegularFile(it) && it.name().endsWith(".settings.gradle.kts")
+}.map { it.name.substringBefore('.') }
+
+plugins.forEach { name ->
+ gradlePlugin {
+ plugins {
+ create(name) {
+ id = name
+ implementationClass = "EmptySettingsPlugin"
+ }
+ }
+
+ logger.info("Applied $name precompiled plugin as stub")
+ }
+}
diff --git a/gradle-conventions-settings/empty/src/main/kotlin/empty-settings.settings.gradle.kts b/gradle-conventions-settings/empty/src/main/kotlin/empty-settings.settings.gradle.kts
new file mode 100644
index 000000000..01aede8e6
--- /dev/null
+++ b/gradle-conventions-settings/empty/src/main/kotlin/empty-settings.settings.gradle.kts
@@ -0,0 +1,5 @@
+/*
+ * Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
+ */
+
+// Do not delete this. It is used as a stub plugin for latest-only plugins
diff --git a/gradle-conventions-settings/settings.gradle.kts b/gradle-conventions-settings/settings.gradle.kts
index 75c3e3148..bf3d82890 100644
--- a/gradle-conventions-settings/settings.gradle.kts
+++ b/gradle-conventions-settings/settings.gradle.kts
@@ -7,4 +7,10 @@ rootProject.name = "gradle-conventions-settings"
// Code below is a hack because a chicken-egg problem, I can't use myself as a settings-plugin
apply(from = "src/main/kotlin/settings-conventions.settings.gradle.kts")
-include(":develocity")
+val kotlinVersion: KotlinVersion by extra
+
+if (kotlinVersion.isAtLeast(1, 9, 0)) {
+ include(":develocity")
+} else {
+ include(":empty")
+}
diff --git a/gradle-conventions/latest-only/src/main/kotlin/conventions-kover.gradle.kts b/gradle-conventions/latest-only/src/main/kotlin/conventions-kover.gradle.kts
index a494c18bb..8606ede0c 100644
--- a/gradle-conventions/latest-only/src/main/kotlin/conventions-kover.gradle.kts
+++ b/gradle-conventions/latest-only/src/main/kotlin/conventions-kover.gradle.kts
@@ -14,7 +14,7 @@ the().apply {
total {
html {
onCheck.set(false)
- charset.set("UTF_8")
+ charset.set("UTF-8")
htmlDir.set(rootDir.resolve("kover"))
}
diff --git a/samples/ktor-all-platforms-app/build.gradle.kts b/samples/ktor-all-platforms-app/build.gradle.kts
index 1889de652..48b39e282 100644
--- a/samples/ktor-all-platforms-app/build.gradle.kts
+++ b/samples/ktor-all-platforms-app/build.gradle.kts
@@ -15,3 +15,14 @@ plugins {
alias(libs.plugins.kotlinx.rpc.platform) apply false
alias(libs.plugins.compose.compiler) apply false
}
+
+allprojects {
+ configurations.all {
+ resolutionStrategy {
+ // Workaround for https://youtrack.jetbrains.com/issue/CMP-6658
+ force(libs.kotlinx.serialization.core)
+ force(libs.kotlinx.serialization.json)
+ force(libs.kotlin.stdlib)
+ }
+ }
+}
diff --git a/samples/ktor-all-platforms-app/composeApp/build.gradle.kts b/samples/ktor-all-platforms-app/composeApp/build.gradle.kts
index 154bd5e8f..a30b21321 100644
--- a/samples/ktor-all-platforms-app/composeApp/build.gradle.kts
+++ b/samples/ktor-all-platforms-app/composeApp/build.gradle.kts
@@ -5,6 +5,8 @@
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
+import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
alias(libs.plugins.kotlinMultiplatform)
@@ -15,6 +17,24 @@ plugins {
}
kotlin {
+ @OptIn(ExperimentalWasmDsl::class)
+ wasmJs {
+ moduleName = "composeApp"
+ browser {
+ val projectDirPath = project.projectDir.path
+ commonWebpackConfig {
+ outputFileName = "composeApp.js"
+ devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
+ static = (static ?: mutableListOf()).apply {
+ // Serve sources to debug inside browser
+ add(projectDirPath)
+ }
+ }
+ }
+ }
+ binaries.executable()
+ }
+
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
@@ -53,12 +73,21 @@ kotlin {
implementation(libs.kotlinx.rpc.krpc.client)
implementation(libs.kotlinx.rpc.krpc.serialization.json)
implementation(libs.kotlinx.rpc.krpc.ktor.client)
- implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.websockets)
}
desktopMain.dependencies {
implementation(compose.desktop.currentOs)
+ implementation(libs.ktor.client.cio)
+ }
+ iosMain.dependencies {
+ implementation(libs.ktor.client.cio)
+ }
+ wasmJsMain.dependencies {
+ implementation(libs.ktor.client.js)
+ }
+ androidMain.dependencies {
+ implementation(libs.ktor.client.cio)
}
}
}
diff --git a/samples/ktor-all-platforms-app/composeApp/src/commonMain/kotlin/App.kt b/samples/ktor-all-platforms-app/composeApp/src/commonMain/kotlin/App.kt
index b6da85c78..ef6420d6c 100644
--- a/samples/ktor-all-platforms-app/composeApp/src/commonMain/kotlin/App.kt
+++ b/samples/ktor-all-platforms-app/composeApp/src/commonMain/kotlin/App.kt
@@ -14,12 +14,12 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import io.ktor.client.*
import io.ktor.http.*
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.streamScoped
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
import ktor_all_platforms_app.composeapp.generated.resources.Res
import ktor_all_platforms_app.composeapp.generated.resources.compose_multiplatform
import org.jetbrains.compose.resources.painterResource
diff --git a/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/App.wasmJs.kt b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/App.wasmJs.kt
new file mode 100644
index 000000000..cda9c0767
--- /dev/null
+++ b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/App.wasmJs.kt
@@ -0,0 +1 @@
+actual val DEV_SERVER_HOST: String = "127.0.0.1"
diff --git a/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/main.kt b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/main.kt
new file mode 100644
index 000000000..299151d4f
--- /dev/null
+++ b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/kotlin/main.kt
@@ -0,0 +1,11 @@
+import App
+import androidx.compose.ui.ExperimentalComposeUiApi
+import androidx.compose.ui.window.ComposeViewport
+import kotlinx.browser.document
+
+@OptIn(ExperimentalComposeUiApi::class)
+fun main() {
+ ComposeViewport(document.body!!) {
+ App()
+ }
+}
diff --git a/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/index.html b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/index.html
new file mode 100644
index 000000000..22ed4af0c
--- /dev/null
+++ b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/index.html
@@ -0,0 +1,12 @@
+
+
+
+
+
+ ktor-all-platforms-app
+
+
+
+
+
+
diff --git a/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/styles.css b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/styles.css
new file mode 100644
index 000000000..0549b10f8
--- /dev/null
+++ b/samples/ktor-all-platforms-app/composeApp/src/wasmJsMain/resources/styles.css
@@ -0,0 +1,7 @@
+html, body {
+ width: 100%;
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ overflow: hidden;
+}
\ No newline at end of file
diff --git a/samples/ktor-all-platforms-app/gradle/libs.versions.toml b/samples/ktor-all-platforms-app/gradle/libs.versions.toml
index ccc34eebf..6af85b4be 100644
--- a/samples/ktor-all-platforms-app/gradle/libs.versions.toml
+++ b/samples/ktor-all-platforms-app/gradle/libs.versions.toml
@@ -15,14 +15,15 @@ androidx-test-junit = "1.2.1"
compose = "1.7.2"
compose-plugin = "1.6.11"
junit = "4.13.2"
-ktor = "2.3.12"
+ktor = "3.0.0-rc-1"
logback = "1.5.8"
-kotlinx-serialization-json = "1.7.1"
-kotlinx-coroutines-core = "1.9.0"
-kotlinx-rpc = "0.2.4"
+serialization = "1.7.1"
+coroutines = "1.9.0"
+kotlinx-rpc = "0.3.0"
[libraries]
# kotlin
+kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
@@ -40,14 +41,13 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =
compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
# kotlinx
-kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinx-serialization-json" }
-kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinx-coroutines-core" }
-kotlinx-coroutines-core-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "kotlinx-coroutines-core" }
+kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" }
+kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" }
+kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
# ktor
ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor" }
-ktor-server-tests = { module = "io.ktor:ktor-server-tests-jvm", version.ref = "ktor" }
ktor-server-cors-jvm = { module = "io.ktor:ktor-server-cors-jvm", version.ref = "ktor" }
ktor-server-websockets-jvm = { module = "io.ktor:ktor-server-websockets-jvm", version.ref = "ktor" }
ktor-server-host-common-jvm = { module = "io.ktor:ktor-server-host-common-jvm", version.ref = "ktor" }
@@ -55,6 +55,7 @@ ktor-server-test-host = { module = "io.ktor:ktor-server-test-host", version.ref
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor-client-websockets = { module = "io.ktor:ktor-client-websockets", version.ref = "ktor" }
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" }
+ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
# kotlinx-rpc
kotlinx-rpc-core = { module = "org.jetbrains.kotlinx:kotlinx-rpc-core" }
diff --git a/samples/ktor-all-platforms-app/server/build.gradle.kts b/samples/ktor-all-platforms-app/server/build.gradle.kts
index 36da35acb..21cace246 100644
--- a/samples/ktor-all-platforms-app/server/build.gradle.kts
+++ b/samples/ktor-all-platforms-app/server/build.gradle.kts
@@ -18,7 +18,7 @@ application {
dependencies {
implementation(projects.shared)
- implementation(libs.kotlinx.coroutines.core.jvm)
+ implementation(libs.kotlinx.coroutines.core)
implementation(libs.logback)
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.netty)
@@ -28,7 +28,7 @@ dependencies {
implementation(libs.kotlinx.rpc.krpc.server)
implementation(libs.kotlinx.rpc.krpc.serialization.json)
implementation(libs.kotlinx.rpc.krpc.ktor.server)
- testImplementation(libs.ktor.server.tests)
+ testImplementation(libs.ktor.server.test.host)
testImplementation(libs.kotlinx.rpc.krpc.client)
testImplementation(libs.kotlinx.rpc.krpc.ktor.client)
testImplementation(libs.kotlin.test.junit)
diff --git a/samples/ktor-all-platforms-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt b/samples/ktor-all-platforms-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
index e79fca664..9fb57c627 100644
--- a/samples/ktor-all-platforms-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
+++ b/samples/ktor-all-platforms-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
@@ -10,9 +10,9 @@ import io.ktor.server.application.*
import io.ktor.server.netty.*
import io.ktor.server.plugins.cors.routing.*
import io.ktor.server.routing.*
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.server.RPC
-import kotlinx.rpc.transport.ktor.server.rpc
+import kotlinx.rpc.krpc.ktor.server.RPC
+import kotlinx.rpc.krpc.ktor.server.rpc
+import kotlinx.rpc.krpc.serialization.json.json
fun main(args: Array): Unit = EngineMain.main(args)
@@ -49,7 +49,7 @@ fun Application.installCORS() {
allowSameOrigin = true
// webpack-dev-server and local development
- val allowedHosts = listOf("localhost:3000", "localhost:8080", "127.0.0.1:8080")
+ val allowedHosts = listOf("localhost:3000", "localhost:8080", "localhost:8081", "127.0.0.1:8080")
allowedHosts.forEach { host ->
allowHost(host, listOf("http", "https", "ws", "wss"))
}
diff --git a/samples/ktor-all-platforms-app/server/src/test/kotlin/kotlinx/rpc/sample/ApplicationTest.kt b/samples/ktor-all-platforms-app/server/src/test/kotlin/kotlinx/rpc/sample/ApplicationTest.kt
index 23107bef5..7755a8551 100644
--- a/samples/ktor-all-platforms-app/server/src/test/kotlin/kotlinx/rpc/sample/ApplicationTest.kt
+++ b/samples/ktor-all-platforms-app/server/src/test/kotlin/kotlinx/rpc/sample/ApplicationTest.kt
@@ -8,12 +8,12 @@ import UserData
import UserService
import io.ktor.server.testing.*
import kotlinx.coroutines.flow.toList
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.streamScoped
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
import kotlin.test.Test
import kotlin.test.assertEquals
diff --git a/samples/ktor-all-platforms-app/shared/build.gradle.kts b/samples/ktor-all-platforms-app/shared/build.gradle.kts
index cdb6d1fac..5d99db48b 100644
--- a/samples/ktor-all-platforms-app/shared/build.gradle.kts
+++ b/samples/ktor-all-platforms-app/shared/build.gradle.kts
@@ -4,6 +4,8 @@
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
+import org.jetbrains.kotlin.gradle.targets.js.dsl.ExperimentalWasmDsl
+import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
plugins {
alias(libs.plugins.kotlinMultiplatform)
@@ -13,6 +15,21 @@ plugins {
}
kotlin {
+ @OptIn(ExperimentalWasmDsl::class)
+ wasmJs {
+ browser {
+ val projectDirPath = project.projectDir.path
+ commonWebpackConfig {
+ devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
+ static = (static ?: mutableListOf()).apply {
+ // Serve sources to debug inside browser
+ add(projectDirPath)
+ }
+ }
+ }
+ }
+ }
+
androidTarget {
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
@@ -31,6 +48,7 @@ kotlin {
api(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.rpc.core)
+ implementation(libs.kotlinx.serialization.core)
implementation(libs.kotlinx.serialization.json)
}
}
diff --git a/samples/ktor-all-platforms-app/shared/src/wasmJsMain/kotlin/Platform.wasmJs.kt b/samples/ktor-all-platforms-app/shared/src/wasmJsMain/kotlin/Platform.wasmJs.kt
index 57b2e1128..83cadf027 100644
--- a/samples/ktor-all-platforms-app/shared/src/wasmJsMain/kotlin/Platform.wasmJs.kt
+++ b/samples/ktor-all-platforms-app/shared/src/wasmJsMain/kotlin/Platform.wasmJs.kt
@@ -2,4 +2,4 @@ class WasmPlatform: Platform {
override val name: String = "Web with Kotlin/Wasm"
}
-actual fun getPlatform(): Platform = WasmPlatform()
\ No newline at end of file
+actual fun getPlatform(): Platform = WasmPlatform()
diff --git a/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/data/Client.kt b/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/data/Client.kt
index 21ca06704..e6aeded96 100644
--- a/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/data/Client.kt
+++ b/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/data/Client.kt
@@ -6,13 +6,12 @@ package kotlinx.rpc.sample.data
import io.ktor.client.HttpClient
import io.ktor.client.engine.okhttp.OkHttp
-import io.ktor.client.plugins.websocket.WebSockets
import io.ktor.client.request.url
import kotlinx.rpc.RPCClient
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
-import kotlinx.rpc.transport.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
suspend fun createRpcClient(): RPCClient {
return HttpClient(OkHttp) {
diff --git a/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/ui/AppViewModel.kt b/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/ui/AppViewModel.kt
index fe4de2672..9eb7679d5 100644
--- a/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/ui/AppViewModel.kt
+++ b/samples/ktor-android-app/app/src/main/kotlin/kotlinx/rpc/sample/ui/AppViewModel.kt
@@ -15,7 +15,7 @@ import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.launch
import kotlinx.rpc.RPCClient
-import kotlinx.rpc.streamScoped
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
import kotlinx.rpc.sample.MyService
import kotlinx.rpc.sample.UserData
diff --git a/samples/ktor-android-app/gradle/libs.versions.toml b/samples/ktor-android-app/gradle/libs.versions.toml
index 44f674283..b5caa4936 100644
--- a/samples/ktor-android-app/gradle/libs.versions.toml
+++ b/samples/ktor-android-app/gradle/libs.versions.toml
@@ -11,11 +11,11 @@ compose-plugin = "1.5.14" # https://mvnrepository.com/artifact/androidx.compose.
compose-bom = "2024.09.02"
material3 = "1.3.0"
junit = "4.13.2"
-ktor = "2.3.12"
+ktor = "3.0.0-rc-1"
kotlinx-serialization-json = "1.7.3"
kotlinx-coroutines-core = "1.9.0"
logback = "1.5.8"
-kotlinx-rpc = "0.2.4"
+kotlinx-rpc = "0.3.0"
[libraries]
# kotlin
diff --git a/samples/ktor-android-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt b/samples/ktor-android-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
index 33573b7c7..d7a9370a4 100644
--- a/samples/ktor-android-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
+++ b/samples/ktor-android-app/server/src/main/kotlin/kotlinx/rpc/sample/Application.kt
@@ -7,8 +7,8 @@ import io.ktor.server.application.*
import io.ktor.server.cio.*
import io.ktor.server.routing.*
import io.ktor.server.websocket.*
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.server.rpc
+import kotlinx.rpc.krpc.ktor.server.rpc
+import kotlinx.rpc.krpc.serialization.json.json
fun main(args: Array): Unit = EngineMain.main(args)
diff --git a/samples/ktor-android-app/server/src/test/kotlin/ApplicationTest.kt b/samples/ktor-android-app/server/src/test/kotlin/ApplicationTest.kt
index aa0f41082..1c76842c1 100644
--- a/samples/ktor-android-app/server/src/test/kotlin/ApplicationTest.kt
+++ b/samples/ktor-android-app/server/src/test/kotlin/ApplicationTest.kt
@@ -5,19 +5,18 @@
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.*
-import io.ktor.server.application.*
import io.ktor.server.response.*
import io.ktor.server.routing.*
import io.ktor.server.testing.*
import kotlinx.coroutines.flow.toList
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
import kotlinx.rpc.sample.MyService
import kotlinx.rpc.sample.UserData
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.streamScoped
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
import kotlin.test.Test
import kotlin.test.assertEquals
diff --git a/samples/ktor-web-app/README.md b/samples/ktor-web-app/README.md
index e19bf290e..fe9243f8e 100644
--- a/samples/ktor-web-app/README.md
+++ b/samples/ktor-web-app/README.md
@@ -1,6 +1,9 @@
# Ktor Web App
Sample application with Kotlin/Js on frontend and Kotlin/Jvm on backend,that uses kRPC with Ktor to communicate.
+> Warning: the code is broken due to https://youtrack.jetbrains.com/issue/KT-71757/
+> No workarounds for now
+
### Running frontend
To run frontend in development mode, run this command:
```bash
diff --git a/samples/ktor-web-app/frontend/build.gradle.kts b/samples/ktor-web-app/frontend/build.gradle.kts
index 09d1ef5f2..eb2d3281e 100644
--- a/samples/ktor-web-app/frontend/build.gradle.kts
+++ b/samples/ktor-web-app/frontend/build.gradle.kts
@@ -17,14 +17,6 @@ kotlin {
cssSupport {
enabled.set(true)
}
-
- val proxies = devServer?.proxy ?: mutableMapOf()
- proxies["/api"] = "http://localhost:8080"
-
- devServer = devServer?.copy(
- port = 3000,
- proxy = proxies
- )
}
}
}
diff --git a/samples/ktor-web-app/frontend/src/jsMain/kotlin/RPC.kt b/samples/ktor-web-app/frontend/src/jsMain/kotlin/RPC.kt
index af3a655cf..3205500f8 100644
--- a/samples/ktor-web-app/frontend/src/jsMain/kotlin/RPC.kt
+++ b/samples/ktor-web-app/frontend/src/jsMain/kotlin/RPC.kt
@@ -6,10 +6,10 @@ import io.ktor.client.*
import io.ktor.client.engine.js.*
import io.ktor.client.request.*
import kotlinx.rpc.RPCClient
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
suspend fun initRpcClient(): RPCClient {
return HttpClient(Js) {
diff --git a/samples/ktor-web-app/frontend/src/jsMain/kotlin/Welcome.kt b/samples/ktor-web-app/frontend/src/jsMain/kotlin/Welcome.kt
index 80f059d14..d16c59e75 100644
--- a/samples/ktor-web-app/frontend/src/jsMain/kotlin/Welcome.kt
+++ b/samples/ktor-web-app/frontend/src/jsMain/kotlin/Welcome.kt
@@ -3,8 +3,7 @@
*/
import emotion.react.css
-import kotlinx.coroutines.flow.Flow
-import kotlinx.rpc.streamScoped
+import kotlinx.rpc.krpc.streamScoped
import react.FC
import react.Props
import react.dom.html.ReactHTML.div
diff --git a/samples/ktor-web-app/gradle/libs.versions.toml b/samples/ktor-web-app/gradle/libs.versions.toml
index 1769e99f4..cde10b6b9 100644
--- a/samples/ktor-web-app/gradle/libs.versions.toml
+++ b/samples/ktor-web-app/gradle/libs.versions.toml
@@ -1,11 +1,11 @@
[versions]
kotlin = "2.0.10"
kotlin-wrappers-bom = "1.0.0-pre.812"
-ktor = "2.3.12"
+ktor = "3.0.0-rc-1"
kotlinx-serialization-json = "1.7.3"
kotlinx-coroutines-core = "1.9.0"
logback = "1.5.8"
-kotlinx-rpc = "0.2.4"
+kotlinx-rpc = "0.3.0"
[libraries]
# kotlin
diff --git a/samples/ktor-web-app/server/src/main/kotlin/Application.kt b/samples/ktor-web-app/server/src/main/kotlin/Application.kt
index 536730da8..7b859168d 100644
--- a/samples/ktor-web-app/server/src/main/kotlin/Application.kt
+++ b/samples/ktor-web-app/server/src/main/kotlin/Application.kt
@@ -8,9 +8,9 @@ import io.ktor.server.cio.*
import io.ktor.server.http.content.*
import io.ktor.server.plugins.cors.routing.*
import io.ktor.server.routing.*
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.server.RPC
-import kotlinx.rpc.transport.ktor.server.rpc
+import kotlinx.rpc.krpc.ktor.server.RPC
+import kotlinx.rpc.krpc.ktor.server.rpc
+import kotlinx.rpc.krpc.serialization.json.json
fun main(args: Array): Unit = EngineMain.main(args)
diff --git a/samples/ktor-web-app/server/src/test/kotlin/ApplicationTest.kt b/samples/ktor-web-app/server/src/test/kotlin/ApplicationTest.kt
index 3b54ea23f..a11982f4d 100644
--- a/samples/ktor-web-app/server/src/test/kotlin/ApplicationTest.kt
+++ b/samples/ktor-web-app/server/src/test/kotlin/ApplicationTest.kt
@@ -4,18 +4,22 @@
import io.ktor.server.testing.*
import kotlinx.coroutines.flow.toList
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.streamScoped
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
import kotlin.test.Test
import kotlin.test.assertEquals
class ApplicationTest {
@Test
fun testRoot() = testApplication {
+ application {
+ module()
+ }
+
val service = createClient {
installRPC()
}.rpc("/api") {
diff --git a/samples/simple-ktor-app/build.gradle.kts b/samples/simple-ktor-app/build.gradle.kts
index 8cf62cdf4..23e6e80bf 100644
--- a/samples/simple-ktor-app/build.gradle.kts
+++ b/samples/simple-ktor-app/build.gradle.kts
@@ -5,8 +5,8 @@
plugins {
kotlin("jvm") version "2.0.10"
kotlin("plugin.serialization") version "2.0.10"
- id("io.ktor.plugin") version "2.3.12"
- id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4"
+ id("io.ktor.plugin") version "3.0.0-rc-1"
+ id("org.jetbrains.kotlinx.rpc.plugin") version "0.3.0"
}
group = "kotlinx.rpc.sample"
@@ -35,10 +35,10 @@ dependencies {
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client")
implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server")
- implementation("io.ktor:ktor-client-cio-jvm")
+ implementation("io.ktor:ktor-client-cio")
implementation("io.ktor:ktor-server-netty-jvm")
implementation("ch.qos.logback:logback-classic:1.5.8")
- testImplementation("io.ktor:ktor-server-tests-jvm")
+ testImplementation("io.ktor:ktor-server-test-host")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:2.0.10")
}
diff --git a/samples/simple-ktor-app/src/main/kotlin/Client.kt b/samples/simple-ktor-app/src/main/kotlin/Client.kt
index d8f3d0da9..284847855 100644
--- a/samples/simple-ktor-app/src/main/kotlin/Client.kt
+++ b/samples/simple-ktor-app/src/main/kotlin/Client.kt
@@ -9,11 +9,11 @@ import kotlinx.coroutines.cancel
import kotlinx.coroutines.flow.flow
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
+import kotlinx.rpc.krpc.streamScoped
import kotlinx.rpc.withService
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.streamScoped
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
fun main() = runBlocking {
val ktorClient = HttpClient {
diff --git a/samples/simple-ktor-app/src/main/kotlin/Server.kt b/samples/simple-ktor-app/src/main/kotlin/Server.kt
index c6c6adcd0..c5fa1ae91 100644
--- a/samples/simple-ktor-app/src/main/kotlin/Server.kt
+++ b/samples/simple-ktor-app/src/main/kotlin/Server.kt
@@ -6,9 +6,9 @@ import io.ktor.server.application.*
import io.ktor.server.engine.*
import io.ktor.server.netty.*
import io.ktor.server.routing.*
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.server.RPC
-import kotlinx.rpc.transport.ktor.server.rpc
+import kotlinx.rpc.krpc.ktor.server.RPC
+import kotlinx.rpc.krpc.ktor.server.rpc
+import kotlinx.rpc.krpc.serialization.json.json
fun main() {
embeddedServer(Netty, port = 8080) {
diff --git a/samples/simple-ktor-app/src/test/kotlin/ApplicationTest.kt b/samples/simple-ktor-app/src/test/kotlin/ApplicationTest.kt
index f81170391..2b754f0a8 100644
--- a/samples/simple-ktor-app/src/test/kotlin/ApplicationTest.kt
+++ b/samples/simple-ktor-app/src/test/kotlin/ApplicationTest.kt
@@ -7,12 +7,12 @@ import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.cancel
import kotlinx.coroutines.launch
-import kotlinx.rpc.client.awaitFieldInitialization
+import kotlinx.rpc.awaitFieldInitialization
+import kotlinx.rpc.krpc.ktor.client.installRPC
+import kotlinx.rpc.krpc.ktor.client.rpc
+import kotlinx.rpc.krpc.ktor.client.rpcConfig
+import kotlinx.rpc.krpc.serialization.json.json
import kotlinx.rpc.withService
-import kotlinx.rpc.serialization.json
-import kotlinx.rpc.transport.ktor.client.installRPC
-import kotlinx.rpc.transport.ktor.client.rpc
-import kotlinx.rpc.transport.ktor.client.rpcConfig
import org.junit.Test
import kotlin.test.assertContentEquals
import kotlin.test.assertEquals
diff --git a/tests/compiler-plugin-tests/build.gradle.kts b/tests/compiler-plugin-tests/build.gradle.kts
index 424d36903..810427286 100644
--- a/tests/compiler-plugin-tests/build.gradle.kts
+++ b/tests/compiler-plugin-tests/build.gradle.kts
@@ -161,6 +161,6 @@ fun Test.setJarPathAsProperty(
}
fun Test.systemPropertyLogged(name: String, value: Any) {
- logger.lifecycle("Setting test prop $name=$value")
+ logger.info("Setting test prop $name=$value")
systemProperty(name, value)
}
diff --git a/versions-root/libs.versions.toml b/versions-root/libs.versions.toml
index 8abb47493..098995e1e 100644
--- a/versions-root/libs.versions.toml
+++ b/versions-root/libs.versions.toml
@@ -1,6 +1,6 @@
[versions]
# core library version
-kotlinx-rpc = "0.3.0-SNAPSHOT"
+kotlinx-rpc = "0.3.0"
# kotlin
kotlin-lang = "2.0.10"