kotlinx.rpc 0.2.4 Help

Versions

As kotlinx.rpc uses Kotlin compiler plugin and KSP plugins, we rely on internal functionality that may change over time with any new Kotlin version. To prevent the library from breaking with an incompatible Kotlin version, we use version prefix for artifacts with code generating functionality.

We provide core version updates for all stable versions of the last three major Kotlin releases. So if the last stable Kotlin version is 2.0.10, as at the time of writing this guide, the following versions of Kotlin are supported:

  • 1.7.0, 1.7.10, 1.7.20, 1.7.21, 1.7.22

  • 1.8.0, 1.8.10, 1.8.20, 1.8.21, 1.8.22

  • 1.9.0, 1.9.10, 1.9.20, 1.9.21, 1.9.22, 1.9.23, 1.9.24, 1.9.25

  • 2.0.0, 2.0.10

Our code generation will support these versions (See more on code generation artifacts). Runtime artifacts are configured with language-version and api-version parameters for the oldest supported minor version of Kotlin.

Project configuration

To simplify project configuration, both our Gradle plugins are able to set proper runtime dependencies versions automatically based on the project's Kotlin version and the Gradle plugin version which is used as a core library version.

plugins { // project's Kotlin plugin kotlin("jvm") version "2.0.10" // kotlinx.rpc plugin id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4" } dependencies { // for kotlinx.rpc runtime dependencies, // Gradle plugin sets version 0.2.4 implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client") implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server") }

Code generation artifacts

To ensure everything works as intended for all supported Kotlin versions, we provide a separate code-generation artifact for each Kotlin version. For example, if a project has this setup:

plugins { kotlin("jvm") version "2.0.10" id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.4" }

Our Gradle plugin will add this dependency to all applicable configurations:

org.jetbrains.kotlinx:kotlinx-rpc-compiler-plugin:2.0.10-0.2.4

Such dependencies are managed automatically, and should not be used explicitly.

Last modified: 19 August 2024