diff --git a/README.md b/README.md index f477f4b5..499f907b 100644 --- a/README.md +++ b/README.md @@ -88,15 +88,6 @@ Check out our [getting started guide](https://kotlin.github.io/kotlinx-rpc) for and some of them will contain service declarations, thus using code generation, while others will only consume them. - The `com.google.devtools.ksp` is required by the library. Corresponding configurations will be set up automatically by `org.jetbrains.kotlinx.rpc.plugin` plugin. -To use the `kotlinx.rpc` Gradle plugins, you need to add the following repositories in the `settings.gradle.kts` file: -```kotlin -pluginManagement { - repositories { - maven(url = "https://maven.pkg.jetbrains.space/public/p/krpc/maven") - gradlePluginPortal() - } -} -``` Example of plugins setup in a project's `build.gradle.kts`: ```kotlin // build.gradle.kts @@ -108,26 +99,25 @@ plugins { } ``` ### Runtime dependencies -To use `kotlinx.rpc` runtime dependencies, you need to add our Space repository to the list of project repositories: +To use `kotlinx.rpc` runtime dependencies, add Maven Central to the list of your repositories: ```kotlin repositories { - maven("https://maven.pkg.jetbrains.space/public/p/krpc/maven") - mavenCentral() // for other dependencies, e.g. Ktor + mavenCentral() } ``` And now you can add dependencies to your project: ```kotlin dependencies { // client API - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client") // server API - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server") // serialization module. also, protobuf and cbor are available - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-serialization-json") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-serialization-json") // transport implementation for Ktor - implementation("org.jetbrains.kotlinx:kotlinx-rpc-transport-ktor-client") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-transport-ktor-server") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-client") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-ktor-server") // Ktor API implementation("io.ktor:ktor-client-cio-jvm:$ktor_version") @@ -169,12 +159,12 @@ plugins { dependencies { // version 0.2.0 is set by the Gradle plugin - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-core") } ``` For a full compatibility checklist, -see [Releases](https://kotlin.github.io/kotlinx-rpc/releases.html). +see [Versions](https://kotlin.github.io/kotlinx-rpc/versions.html). ## JetBrains Product diff --git a/docs/pages/kotlinx-rpc/rpc.tree b/docs/pages/kotlinx-rpc/rpc.tree index da487e1e..2e3eeccb 100644 --- a/docs/pages/kotlinx-rpc/rpc.tree +++ b/docs/pages/kotlinx-rpc/rpc.tree @@ -24,5 +24,8 @@ - + + + + \ No newline at end of file diff --git a/docs/pages/kotlinx-rpc/topics/0-2-0.topic b/docs/pages/kotlinx-rpc/topics/0-2-0.topic new file mode 100644 index 00000000..0bafc267 --- /dev/null +++ b/docs/pages/kotlinx-rpc/topics/0-2-0.topic @@ -0,0 +1,142 @@ + + + + + + +

+ Version 0.2.0 introduces changes that are not compatible with the previous 0.1.0 release. + This guide contains a full list of all incompatible changes. +

+ + + Most of the artifacts were renamed and restructured to + properly reflect what parts of the library they contain. + Below is the complete list of new names and changes. + Note that only artifactId is shown; the groupId remains unchanged: + +
  • + kotlinx-rpc-runtime +

    Renamed to kotlinx-rpc-core

    +
  • +
  • + kotlinx-rpc-runtime +

    Declarations moved to kotlinx-rpc-utils

    +
  • +
  • + kotlinx-rpc-runtime-client +

    Renamed to kotlinx-rpc-krpc-client

    +
  • +
  • + kotlinx-rpc-runtime-server +

    Renamed to kotlinx-rpc-krpc-server

    +
  • +
  • + kotlinx-rpc-runtime-logging +

    Renamed to kotlinx-rpc-krpc-logging

    +
  • +
  • + kotlinx-rpc-runtime-test +

    Renamed to kotlinx-rpc-krpc-test

    +
  • +
  • + kotlinx-rpc-runtime-serialization +

    Renamed to kotlinx-rpc-krpc-serialization-core

    +
  • +
  • + kotlinx-rpc-runtime-serialization-json +

    Renamed to kotlinx-rpc-krpc-serialization-json

    +
  • +
  • + kotlinx-rpc-runtime-serialization-cbor +

    Renamed to kotlinx-rpc-krpc-serialization-cbor

    +
  • +
  • + kotlinx-rpc-runtime-serialization-protobuf +

    Renamed to kotlinx-rpc-krpc-serialization-protobuf

    +
  • +
  • + kotlinx-rpc-transport-ktor +

    Renamed to kotlinx-rpc-krpc-ktor-core

    +
  • +
  • + kotlinx-rpc-transport-ktor-client +

    Renamed to kotlinx-rpc-krpc-ktor-client

    +
  • +
  • + kotlinx-rpc-transport-ktor-server +

    Renamed to kotlinx-rpc-krpc-ktor-server

    +
  • +
    +
    + + +

    + Our version scheme has changed. + Prior to this release, all artifacts were versioned with the Kotlin prefix for multiple versions of Kotlin: +

    + + org.jetbrains.kotlinx.kotlinx-rpc-runtime:1.9.24-0.1.0 + +

    + This approach proved challenging for the third-party library developers, + as it was not clear which version they should use for their artifacts. +

    +

    + From now on, only code-generation artifacts will contain the explicit Kotlin version. + All other artifacts will use a simplified versioning format like this: +

    + + org.jetbrains.kotlinx.kotlinx-rpc-core:0.2.0 + +

    + Our gradle plugin is still capable of including proper versions of artifacts for you. + Code-generation artifacts are added automatically and should not be referred to directly. +

    +

    + To know more about versioning, see . +

    +
    + + +

    + Version 0.2.0 is being released to the Maven Central repository instead of Space, like it was previously. + In your gradle build scripts (build.gradle.kts) you need to update the repository to ensure you consume the correct artifacts. +

    +

    Old configuration:

    + + repositories { + maven("https://maven.pkg.jetbrains.space/public/p/krpc/maven") + } + +

    New configuration:

    + + repositories { + mavenCentral() + } + +

    + This also affects Gradle plugins. + Now they are being published to the Gradle Plugin Portal. + That means that the old configuration block in settings.gradle.kts + is no longer needed. +

    +

    You can remove this block:

    + + pluginManagement { + repositories { + maven("https://maven.pkg.jetbrains.space/public/p/krpc/maven") + } + } + + + If you also had gradlePluginPortal() defined in pluginManagement + repositories, you still can remove the whole block completely, as the plugin portal repository is enabled by default. + +
    +
    diff --git a/docs/pages/kotlinx-rpc/topics/get-started.topic b/docs/pages/kotlinx-rpc/topics/get-started.topic index 67e37924..1b2652ec 100644 --- a/docs/pages/kotlinx-rpc/topics/get-started.topic +++ b/docs/pages/kotlinx-rpc/topics/get-started.topic @@ -52,32 +52,13 @@ href="https://docs.gradle.org/current/userguide/declaring_repositories.html">repository from which they will be consumed.

    - Add the following repositories in your build.gradle.kts file: + Add the following repository in your build.gradle.kts file:

    repositories { - // for kotlinx.rpc dependencies - maven(url = "https://maven.pkg.jetbrains.space/public/p/krpc/maven") - // for other dependencies, like Ktor mavenCentral() } - -

    In your settings.gradle.kts file, specify a - repository for - plugins - to be consumed from:

    - - - pluginManagement { - repositories { - // kotlinx.rpc plugins will be downloaded from here - maven(url = "https://maven.pkg.jetbrains.space/public/p/krpc/maven") - // other plugins, like Kotlin, will be downloaded from here - gradlePluginPortal() - } - } -

    kotlinx.rpc provides you with @@ -90,8 +71,8 @@ dependencies { // example kotlinx.rpc artifacts - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client:%kotlinx-rpc-version%") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server:%kotlinx-rpc-version%") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:%kotlinx-rpc-version%") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:%kotlinx-rpc-version%") }

    This adds the APIs needed to work with both client and server code using kotlinx.rpc.

    @@ -106,12 +87,12 @@ sourceSets { iosMain { // let's say that we have code for the client in iosMain sources set - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client:%kotlinx-rpc-version%") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:%kotlinx-rpc-version%") } jvmMain { // let's say that we have code for the server in jvmMain sources set - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server:%kotlinx-rpc-version%") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:%kotlinx-rpc-version%") } } } @@ -151,7 +132,7 @@ id("org.jetbrains.kotlinx.rpc.plugin") version "%kotlinx-rpc-version%" } -

    To learn more about versioning, see .

    +

    To learn more about versioning, see .

    diff --git a/docs/pages/kotlinx-rpc/topics/plugins.topic b/docs/pages/kotlinx-rpc/topics/plugins.topic index 9c4d1279..b9ccb15d 100644 --- a/docs/pages/kotlinx-rpc/topics/plugins.topic +++ b/docs/pages/kotlinx-rpc/topics/plugins.topic @@ -42,8 +42,8 @@ dependencies { // versions are set automatically to %kotlinx-rpc-version% - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server") }

    Using this plugin with version catalogs, your code can be rewritten like this:

    @@ -54,7 +54,7 @@ kotlinx-rpc-core = "%kotlinx-rpc-version%"; [libraries] - kotlinx-rpc-client = { module = "org.jetbrains.kotlinx:kotlinx-rpc-runtime-client" } + kotlinx-rpc-client = { module = "org.jetbrains.kotlinx:kotlinx-rpc-krpc-client" } [plugins] kotlinx-rpc-platform = { id = "org.jetbrains.kotlinx.rpc.platform"; version.ref = "kotlinx-rpc-core"; } @@ -96,8 +96,8 @@ } dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server") }
    diff --git a/docs/pages/kotlinx-rpc/topics/releases.topic b/docs/pages/kotlinx-rpc/topics/versions.topic similarity index 97% rename from docs/pages/kotlinx-rpc/topics/releases.topic rename to docs/pages/kotlinx-rpc/topics/versions.topic index 3fba126a..104679eb 100644 --- a/docs/pages/kotlinx-rpc/topics/releases.topic +++ b/docs/pages/kotlinx-rpc/topics/versions.topic @@ -7,7 +7,7 @@ SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd"> + title="Versions" id="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, @@ -56,8 +56,8 @@ dependencies { // for kotlinx.rpc runtime dependencies, // Gradle plugin sets version %kotlinx-rpc-version% - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-client") - implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime-server") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-client") + implementation("org.jetbrains.kotlinx:kotlinx-rpc-krpc-server") }