From c36199c016cdef36d1d5dea66152249c2a503b5b Mon Sep 17 00:00:00 2001 From: Alexander Sysoev Date: Fri, 7 Feb 2025 12:03:12 +0100 Subject: [PATCH 1/4] Fix println tests --- README.md | 13 +++++++------ docs/pages/kotlinx-rpc/topics/versions.topic | 3 ++- docs/pages/kotlinx-rpc/v.list | 2 +- samples/grpc-app/build.gradle.kts | 4 ++-- .../gradle/libs.versions.toml | 2 +- samples/ktor-android-app/gradle/libs.versions.toml | 2 +- samples/ktor-web-app/gradle/libs.versions.toml | 2 +- samples/simple-ktor-app/build.gradle.kts | 6 +++--- 8 files changed, 18 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index c574003cc..c5c07c245 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ import kotlinx.rpc.annotations.Rpc interface AwesomeService : RemoteService { suspend fun getNews(city: String): Flow - suspend fun daysUntilStableRelese(): Int + suspend fun daysUntilStableRelease(): Int } ``` In your server code define how to respond by simply implementing the service: @@ -43,7 +43,7 @@ class AwesomeServiceImpl( } } - override suspend fun daysUntilStableRelese(): Int { + override suspend fun daysUntilStableRelease(): Int { return if (parameters.stable) 0 else { parameters.daysUntilStable ?: error("Who says it will be stable?") } @@ -88,7 +88,7 @@ val rpcClient = HttpClient { installKrpc() }.rpc { val service = rpcClient.withService() -service.daysUntilStableRelese() +service.daysUntilStableRelease() streamScoped { service.getNews("KotlinBurg").collect { article -> @@ -114,8 +114,8 @@ that will set up code generation in a project. Example of a setup in a project's `build.gradle.kts`: ```kotlin plugins { - kotlin("multiplatform") version "2.1.0" - kotlin("plugin.serialization") version "2.1.0" + kotlin("multiplatform") version "2.1.10" + kotlin("plugin.serialization") version "2.1.10" id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0" } ``` @@ -176,7 +176,8 @@ For a working example, see the [sample gRPC project](/samples/grpc-app). ## Kotlin compatibility We support all stable Kotlin versions starting from 2.0.0: -- 2.0.0, 2.0.10, 2.0.20, 2.0.21, 2.1.0 +- 2.0.0, 2.0.10, 2.0.20, 2.0.21 +- 2.1.0, 2.1.10 For a full compatibility checklist, see [Versions](https://kotlin.github.io/kotlinx-rpc/versions.html). diff --git a/docs/pages/kotlinx-rpc/topics/versions.topic b/docs/pages/kotlinx-rpc/topics/versions.topic index 3a0014d4e..353f85d6a 100644 --- a/docs/pages/kotlinx-rpc/topics/versions.topic +++ b/docs/pages/kotlinx-rpc/topics/versions.topic @@ -21,7 +21,8 @@ the following versions of Kotlin are supported:

-
  • 2.0.0, 2.0.10, 2.0.20, 2.0.21, 2.1.0
  • +
  • 2.0.0, 2.0.10, 2.0.20, 2.0.21
  • +
  • 2.1.0, 2.1.10
  • Our code generation will support these versions (See more on code generation artifacts). diff --git a/docs/pages/kotlinx-rpc/v.list b/docs/pages/kotlinx-rpc/v.list index 873005992..b9cf2b5ff 100644 --- a/docs/pages/kotlinx-rpc/v.list +++ b/docs/pages/kotlinx-rpc/v.list @@ -15,5 +15,5 @@ - + diff --git a/samples/grpc-app/build.gradle.kts b/samples/grpc-app/build.gradle.kts index b0ec82e38..9fbfd78cd 100644 --- a/samples/grpc-app/build.gradle.kts +++ b/samples/grpc-app/build.gradle.kts @@ -3,8 +3,8 @@ */ plugins { - kotlin("jvm") version "2.1.0" - kotlin("plugin.serialization") version "2.1.0" + kotlin("jvm") version "2.1.10" + kotlin("plugin.serialization") version "2.1.10" id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0-grpc-6" id("com.google.protobuf") version "0.9.4" } diff --git a/samples/ktor-all-platforms-app/gradle/libs.versions.toml b/samples/ktor-all-platforms-app/gradle/libs.versions.toml index 7cf70fad0..ca7bcb0ff 100644 --- a/samples/ktor-all-platforms-app/gradle/libs.versions.toml +++ b/samples/ktor-all-platforms-app/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.1.0" +kotlin = "2.1.10" agp = "8.8.0-alpha05" android-compileSdk = "35" diff --git a/samples/ktor-android-app/gradle/libs.versions.toml b/samples/ktor-android-app/gradle/libs.versions.toml index f59b98e5e..56bff54d2 100644 --- a/samples/ktor-android-app/gradle/libs.versions.toml +++ b/samples/ktor-android-app/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] agp = "8.8.0" -kotlin = "2.1.0" +kotlin = "2.1.10" androidx-activityCompose = "1.9.3" androidx-appcompat = "1.7.0" androidx-constraintlayout = "2.2.0" diff --git a/samples/ktor-web-app/gradle/libs.versions.toml b/samples/ktor-web-app/gradle/libs.versions.toml index a15bf2a42..3d8d0af70 100644 --- a/samples/ktor-web-app/gradle/libs.versions.toml +++ b/samples/ktor-web-app/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -kotlin = "2.1.0" +kotlin = "2.1.10" kotlin-wrappers-bom = "2025.1.2" ktor = "3.0.3" kotlinx-serialization-json = "1.8.0" diff --git a/samples/simple-ktor-app/build.gradle.kts b/samples/simple-ktor-app/build.gradle.kts index 00cff85e5..4e908aa95 100644 --- a/samples/simple-ktor-app/build.gradle.kts +++ b/samples/simple-ktor-app/build.gradle.kts @@ -3,8 +3,8 @@ */ plugins { - kotlin("jvm") version "2.1.0" - kotlin("plugin.serialization") version "2.1.0" + kotlin("jvm") version "2.1.10" + kotlin("plugin.serialization") version "2.1.10" id("io.ktor.plugin") version "3.0.3" id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0" } @@ -40,5 +40,5 @@ dependencies { implementation("ch.qos.logback:logback-classic:1.5.16") testImplementation("io.ktor:ktor-server-test-host") - testImplementation("org.jetbrains.kotlin:kotlin-test-junit:2.1.0") + testImplementation("org.jetbrains.kotlin:kotlin-test-junit:2.1.10") } From 860a9218c3f3f5b850f5185c27a7ebb4b2f80170 Mon Sep 17 00:00:00 2001 From: Alexander Sysoev Date: Tue, 11 Feb 2025 14:38:12 +0100 Subject: [PATCH 2/4] CHANGELOG.md --- CHANGELOG.md | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a1893d96..d9463a23f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,32 @@ +# 0.5.1 +> Published 12 February 2025 + +### Features ๐ŸŽ‰ +* 2.1.10 by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/271 + +### Documentation ๐Ÿ“— +* Fix typo in README.md by @SebastianAigner in https://github.com/Kotlin/kotlinx-rpc/pull/266 +* Added IDE plugin docs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/273 + +### Infra ๐Ÿšง +* Update for IDE configs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/272 +* Added python deps automerge by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/276 + +### Other Changes ๐Ÿงน +* Update README.md by @pambrose in https://github.com/Kotlin/kotlinx-rpc/pull/268 +* Added monitor app for deps publication by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/265 +* Fix kotlin master by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/274 +* Fix println tests by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/277 +* Update Python Monitor Dependencies by @renovate in https://github.com/Kotlin/kotlinx-rpc/pull/278 + +## New Contributors +* @SebastianAigner made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/266 +* @pambrose made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/268 + +**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.5.0...0.5.1 + # 0.5.0 -> Published 27 January 2024 +> Published 27 January 2025 ### Features ๐ŸŽ‰ * Update Service Descriptors Generation by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/227 From fc13a8cd72a4a929fcbef203db326c5104a6e3a9 Mon Sep 17 00:00:00 2001 From: Alexander Sysoev Date: Tue, 11 Feb 2025 14:40:16 +0100 Subject: [PATCH 3/4] Update version to 0.5.1 --- .github/workflows/docs.yml | 2 +- README.md | 12 ++++++------ docs/pages/kotlinx-rpc/help-versions.json | 2 +- docs/pages/kotlinx-rpc/v.list | 2 +- docs/pages/kotlinx-rpc/writerside.cfg | 2 +- .../ktor-all-platforms-app/gradle/libs.versions.toml | 2 +- samples/ktor-android-app/gradle/libs.versions.toml | 2 +- samples/ktor-web-app/gradle/libs.versions.toml | 2 +- samples/simple-ktor-app/build.gradle.kts | 12 ++++++------ versions-root/libs.versions.toml | 2 +- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e933ca248..964fdbf98 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.5.0' + CONFIG_JSON_VERSION: '0.5.1' jobs: build: diff --git a/README.md b/README.md index c5c07c245..320b86a16 100644 --- a/README.md +++ b/README.md @@ -116,7 +116,7 @@ Example of a setup in a project's `build.gradle.kts`: plugins { kotlin("multiplatform") version "2.1.10" kotlin("plugin.serialization") version "2.1.10" - id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0" + id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.1" } ``` @@ -131,15 +131,15 @@ And now you can add dependencies to your project: ```kotlin dependencies { // Client API - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.5.1") // Server API - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.5.1") // Serialization module. Also, protobuf and cbor are provided - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.5.1") // Transport implementation for Ktor - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.5.0") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.5.1") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.5.1") // Ktor API implementation("io.ktor:ktor-client-cio-jvm:$ktor_version") diff --git a/docs/pages/kotlinx-rpc/help-versions.json b/docs/pages/kotlinx-rpc/help-versions.json index 445d8a961..bc1ee7380 100644 --- a/docs/pages/kotlinx-rpc/help-versions.json +++ b/docs/pages/kotlinx-rpc/help-versions.json @@ -1,3 +1,3 @@ [ - {"version":"0.5.0","url":"/kotlinx-rpc/0.5.0/","isCurrent":true} + {"version":"0.5.1","url":"/kotlinx-rpc/0.5.1/","isCurrent":true} ] diff --git a/docs/pages/kotlinx-rpc/v.list b/docs/pages/kotlinx-rpc/v.list index b9cf2b5ff..a0323eee4 100644 --- a/docs/pages/kotlinx-rpc/v.list +++ b/docs/pages/kotlinx-rpc/v.list @@ -14,6 +14,6 @@ - + diff --git a/docs/pages/kotlinx-rpc/writerside.cfg b/docs/pages/kotlinx-rpc/writerside.cfg index 14e4f4b76..b007eb914 100644 --- a/docs/pages/kotlinx-rpc/writerside.cfg +++ b/docs/pages/kotlinx-rpc/writerside.cfg @@ -12,5 +12,5 @@ - + diff --git a/samples/ktor-all-platforms-app/gradle/libs.versions.toml b/samples/ktor-all-platforms-app/gradle/libs.versions.toml index ca7bcb0ff..906c1cb14 100644 --- a/samples/ktor-all-platforms-app/gradle/libs.versions.toml +++ b/samples/ktor-all-platforms-app/gradle/libs.versions.toml @@ -19,7 +19,7 @@ ktor = "3.0.3" logback = "1.5.16" serialization = "1.8.0" coroutines = "1.10.1" -kotlinx-rpc = "0.5.0" +kotlinx-rpc = "0.5.1" [libraries] # kotlin diff --git a/samples/ktor-android-app/gradle/libs.versions.toml b/samples/ktor-android-app/gradle/libs.versions.toml index 56bff54d2..2db1303d8 100644 --- a/samples/ktor-android-app/gradle/libs.versions.toml +++ b/samples/ktor-android-app/gradle/libs.versions.toml @@ -15,7 +15,7 @@ ktor = "3.0.3" kotlinx-serialization-json = "1.8.0" kotlinx-coroutines-core = "1.10.1" logback = "1.5.16" -kotlinx-rpc = "0.5.0" +kotlinx-rpc = "0.5.1" [libraries] # kotlin diff --git a/samples/ktor-web-app/gradle/libs.versions.toml b/samples/ktor-web-app/gradle/libs.versions.toml index 3d8d0af70..989c5cd99 100644 --- a/samples/ktor-web-app/gradle/libs.versions.toml +++ b/samples/ktor-web-app/gradle/libs.versions.toml @@ -5,7 +5,7 @@ ktor = "3.0.3" kotlinx-serialization-json = "1.8.0" kotlinx-coroutines-core = "1.10.1" logback = "1.5.16" -kotlinx-rpc = "0.5.0" +kotlinx-rpc = "0.5.1" [libraries] # kotlin diff --git a/samples/simple-ktor-app/build.gradle.kts b/samples/simple-ktor-app/build.gradle.kts index 4e908aa95..b6bff4f7e 100644 --- a/samples/simple-ktor-app/build.gradle.kts +++ b/samples/simple-ktor-app/build.gradle.kts @@ -6,7 +6,7 @@ plugins { kotlin("jvm") version "2.1.10" kotlin("plugin.serialization") version "2.1.10" id("io.ktor.plugin") version "3.0.3" - id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.0" + id("org.jetbrains.kotlinx.rpc.plugin") version "0.5.1" } group = "kotlinx.rpc.sample" @@ -28,12 +28,12 @@ kotlin { } dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.5.0") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.5.0") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:0.5.1") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:0.5.1") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json:0.5.1") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.5.0") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.5.0") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client:0.5.1") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server:0.5.1") implementation("io.ktor:ktor-client-cio") implementation("io.ktor:ktor-server-netty-jvm") diff --git a/versions-root/libs.versions.toml b/versions-root/libs.versions.toml index 2df349e96..238c3f3f8 100644 --- a/versions-root/libs.versions.toml +++ b/versions-root/libs.versions.toml @@ -1,6 +1,6 @@ [versions] # core library version -kotlinx-rpc = "0.6.0-SNAPSHOT" +kotlinx-rpc = "0.5.1" # kotlin kotlin-lang = "2.1.10" # or env.KOTLIN_VERSION From d9d9c007d0ff74ec0f981861de0e5dfb1841decf Mon Sep 17 00:00:00 2001 From: Alexander Sysoev Date: Tue, 11 Feb 2025 15:55:30 +0100 Subject: [PATCH 4/4] detekt --- .../kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt b/krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt index 732c296e9..7cf2f785f 100644 --- a/krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt +++ b/krpc/krpc-test/src/jvmMain/kotlin/kotlinx/rpc/krpc/test/KrpcTestServiceBackend.kt @@ -21,6 +21,7 @@ class KrpcTestServiceBackend(override val coroutineContext: CoroutineContext) : const val SHARED_FLOW_REPLAY = 5 } + @Suppress("detekt.EmptyFunctionBlock") override suspend fun empty() {} override suspend fun returnType(): String { @@ -156,8 +157,8 @@ class KrpcTestServiceBackend(override val coroutineContext: CoroutineContext) : } override suspend fun streamInStreamWithStream(payloadWithPayload: Flow): Int { - payloadWithPayload.collectIndexed { index, it -> - assertContentEquals(KrpcTransportTestBase.expectedPayloadWithPayload(index), it.collect()) + payloadWithPayload.collectIndexed { index, payload -> + assertContentEquals(KrpcTransportTestBase.expectedPayloadWithPayload(index), payload.collect()) } return 5 }