Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.2.1 #124

Merged
merged 10 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.1.0'
CONFIG_JSON_VERSION: '0.2.1'

jobs:
build:
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 0.2.1
> Published 1 July 2024

### Breaking changes
Release contains breaking changes, see the [migration guide](https://kotlin.github.io/kotlinx-rpc/0-2-0.html)

* Update the project structure to use a new versioning by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/92
* Consistent module structure by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/114
* KRPC-63 Reorganize modules into a logical structure by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/110

### Features
* KRPC-62 WebSocketSession KtorRPCClient by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/107

### Bug fixes
* Fix typo by @fatalistt in https://github.com/Kotlin/kotlinx-rpc/pull/76
* Fix README by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/79
* Remove todos from repo links by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/85
* Fix typo in README.md by @zhelenskiy in https://github.com/Kotlin/kotlinx-rpc/pull/87
* Fix KDoc reference by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/103
* Fix native targets compiler plugins (#93) by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/112

### Deprecations
* KRPC-59 streamScoped has internal package by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/104

### Documentation
* Updated links on the docs website by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/71
* Added search indexes publication to Algolia action by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/73
* Fix algolia artifact in GH Actions by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/80
* Docs: Add structure to existing content by @vnikolova in https://github.com/Kotlin/kotlinx-rpc/pull/86
* Added build and test docs on PR by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/97
* Fixed GH Actions for docs by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/99
* Disable docs website autoupdate by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/108
* KRPC-60 Update docs to match the new versioning scheme by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/109

### Infra
* Update version to 0.1.1-SNAPSHOT by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/64
* Version updates by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/72
* Signing and Publication by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/74
* IDEA. Issue links by @turansky in https://github.com/Kotlin/kotlinx-rpc/pull/96
* IDEA. Vector icon by @turansky in https://github.com/Kotlin/kotlinx-rpc/pull/98
* KRPC-71 Type-safe project accessors by @Mr3zee in https://github.com/Kotlin/kotlinx-rpc/pull/106

## New Contributors
* @jvmusin made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/69
* @fatalistt made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/76
* @zhelenskiy made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/87
* @turansky made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/96
* @vnikolova made their first contribution in https://github.com/Kotlin/kotlinx-rpc/pull/86

**Full Changelog**: https://github.com/Kotlin/kotlinx-rpc/compare/0.1.0...0.2.1
34 changes: 12 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,46 +88,36 @@ 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
plugins {
kotlin("jvm") version "1.9.24"
kotlin("plugin.serialization") version "1.9.24"
id("com.google.devtools.ksp") version "1.9.24-1.0.20"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.1.0"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.1"
}
```
### 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")
Expand Down Expand Up @@ -164,17 +154,17 @@ based on the project's Kotlin version:
```kotlin
plugins {
kotlin("jvm") version "1.9.24"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.1.0"
id("org.jetbrains.kotlinx.rpc.plugin") version "0.2.1"
}

dependencies {
// version 0.1.0 is set by the Gradle plugin
implementation("org.jetbrains.kotlinx:kotlinx-rpc-runtime")
// version 0.2.1 is set by the Gradle plugin
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

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/kotlinx-rpc/help-versions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[
{"version":"0.1.0","url":"/kotlinx-rpc/0.1.0/","isCurrent":true}
{"version":"0.2.1","url":"/kotlinx-rpc/0.2.1/","isCurrent":true}
]
5 changes: 4 additions & 1 deletion docs/pages/kotlinx-rpc/rpc.tree
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
<toc-element topic="transport.topic"/>
</toc-element>
</toc-element>
<toc-element topic="releases.topic"/>
<toc-element topic="versions.topic"/>
<toc-element toc-title="Migration guides">
<toc-element topic="0-2-1.topic"/>
</toc-element>
</instance-profile>
142 changes: 142 additions & 0 deletions docs/pages/kotlinx-rpc/topics/0-2-1.topic
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2023-2024 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license.
-->

<!DOCTYPE topic
SYSTEM "https://resources.jetbrains.com/writerside/1.0/xhtml-entities.dtd">
<topic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/topic.v2.xsd"
title="Migration to 0.2.1" id="0-2-1" help-id="0-2-0">

<p>
Version <code>0.2.1</code> introduces changes that are not compatible with the previous <code>0.1.0</code> release.
This guide contains a full list of all incompatible changes.
</p>

<chapter title="New artifact names" id="artifacts">
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 <code>artifactId</code> is shown; the <code>groupId</code> remains unchanged:
<list>
<li>
<code>kotlinx-rpc-runtime</code>
<p>Renamed to <code>kotlinx-rpc-core</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime</code>
<p>Declarations <b>moved</b> to <code>kotlinx-rpc-utils</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-client</code>
<p>Renamed to <code>kotlinx-rpc-krpc-client</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-server</code>
<p>Renamed to <code>kotlinx-rpc-krpc-server</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-logging</code>
<p>Renamed to <code>kotlinx-rpc-krpc-logging</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-test</code>
<p>Renamed to <code>kotlinx-rpc-krpc-test</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-serialization</code>
<p>Renamed to <code>kotlinx-rpc-krpc-serialization-core</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-serialization-json</code>
<p>Renamed to <code>kotlinx-rpc-krpc-serialization-json</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-serialization-cbor</code>
<p>Renamed to <code>kotlinx-rpc-krpc-serialization-cbor</code></p>
</li>
<li>
<code>kotlinx-rpc-runtime-serialization-protobuf</code>
<p>Renamed to <code>kotlinx-rpc-krpc-serialization-protobuf</code></p>
</li>
<li>
<code>kotlinx-rpc-transport-ktor</code>
<p>Renamed to <code>kotlinx-rpc-krpc-ktor-core</code></p>
</li>
<li>
<code>kotlinx-rpc-transport-ktor-client</code>
<p>Renamed to <code>kotlinx-rpc-krpc-ktor-client</code></p>
</li>
<li>
<code>kotlinx-rpc-transport-ktor-server</code>
<p>Renamed to <code>kotlinx-rpc-krpc-ktor-server</code></p>
</li>
</list>
</chapter>

<chapter title="Versioning" id="versioning">
<p>
Our version scheme has changed.
Prior to this release, all artifacts were versioned with the Kotlin prefix for multiple versions of Kotlin:
</p>
<code-block>
org.jetbrains.kotlinx.kotlinx-rpc-runtime:1.9.24-0.1.0
</code-block>
<p>
This approach proved challenging for the third-party library developers,
as it was not clear which version they should use for their artifacts.
</p>
<p>
From now on, only code-generation artifacts will contain the explicit Kotlin version.
All other artifacts will use a simplified versioning format like this:
</p>
<code-block>
org.jetbrains.kotlinx.kotlinx-rpc-core:0.2.1
</code-block>
<p>
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.
</p>
<p>
To know more about versioning, see <a href="versions.topic"/>.
</p>
</chapter>

<chapter title="Repositories" id="repositories">
<p>
Version <code>0.2.1</code> is being released to the Maven Central repository instead of Space, like it was previously.
In your gradle build scripts (<code>build.gradle.kts</code>) you need to update the repository to ensure you consume the correct artifacts.
</p>
<p>Old configuration:</p>
<code-block lang="kotlin">
repositories {
maven("https://maven.pkg.jetbrains.space/public/p/krpc/maven")
}
</code-block>
<p>New configuration:</p>
<code-block lang="kotlin">
repositories {
mavenCentral()
}
</code-block>
<p>
This also affects Gradle plugins.
Now they are being published to the Gradle Plugin Portal.
That means that the old configuration block in <code>settings.gradle.kts</code>
is no longer needed.
</p>
<p>You can remove this block:</p>
<code-block lang="kotlin">
pluginManagement {
repositories {
maven("https://maven.pkg.jetbrains.space/public/p/krpc/maven")
}
}
</code-block>
<tip>
If you also had <code>gradlePluginPortal()</code> defined in <code>pluginManagement</code>
repositories, you still can remove the whole block completely, as the plugin portal repository is enabled by default.
</tip>
</chapter>
</topic>
31 changes: 6 additions & 25 deletions docs/pages/kotlinx-rpc/topics/get-started.topic
Original file line number Diff line number Diff line change
Expand Up @@ -52,32 +52,13 @@
href="https://docs.gradle.org/current/userguide/declaring_repositories.html">repository</a>
from which they will be consumed.</p>
<p>
Add the following repositories in your <path>build.gradle.kts</path> file:
Add the following repository in your <path>build.gradle.kts</path> file:
</p>
<code-block lang="kotlin">
repositories {
// for kotlinx.rpc dependencies
maven(url = &quot;https://maven.pkg.jetbrains.space/public/p/krpc/maven&quot;)
// for other dependencies, like Ktor
mavenCentral()
}
</code-block>

<p>In your <path>settings.gradle.kts</path> file, specify a
<a href="https://docs.gradle.org/current/userguide/plugins.html#sec:plugin_management">repository for
plugins</a>
to be consumed from:</p>

<code-block lang="kotlin">
pluginManagement {
repositories {
// kotlinx.rpc plugins will be downloaded from here
maven(url = &quot;https://maven.pkg.jetbrains.space/public/p/krpc/maven&quot;)
// other plugins, like Kotlin, will be downloaded from here
gradlePluginPortal()
}
}
</code-block>
</chapter>
<chapter title="Add runtime dependencies" id="add-runtime-dependencies">
<p><code>kotlinx.rpc</code> provides you with
Expand All @@ -90,8 +71,8 @@
<code-block lang="kotlin">
dependencies {
// example kotlinx.rpc artifacts
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-client:%kotlinx-rpc-version%&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-server:%kotlinx-rpc-version%&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:%kotlinx-rpc-version%&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:%kotlinx-rpc-version%&quot;)
}
</code-block>
<p>This adds the APIs needed to work with both client and server code using <code>kotlinx.rpc</code>.</p>
Expand All @@ -106,12 +87,12 @@
sourceSets {
iosMain {
// let's say that we have code for the client in iosMain sources set
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-client:%kotlinx-rpc-version%&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-client:%kotlinx-rpc-version%&quot;)
}

jvmMain {
// let's say that we have code for the server in jvmMain sources set
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-server:%kotlinx-rpc-version%&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-server:%kotlinx-rpc-version%&quot;)
}
}
}
Expand Down Expand Up @@ -151,7 +132,7 @@
id(&quot;org.jetbrains.kotlinx.rpc.plugin&quot;) version &quot;%kotlinx-rpc-version%&quot;
}
</code-block>
<p>To learn more about versioning, see <a href="releases.topic"/>.</p>
<p>To learn more about versioning, see <a href="versions.topic"/>.</p>
</chapter>

<chapter title="Add serialization dependency" id="add-serialization-dependency">
Expand Down
10 changes: 5 additions & 5 deletions docs/pages/kotlinx-rpc/topics/plugins.topic
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@

dependencies {
// versions are set automatically to %kotlinx-rpc-version%
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-client&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-runtime-server&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-client&quot;)
implementation(&quot;org.jetbrains.kotlinx:kotlinx-rpc-krpc-server&quot;)
}
</code-block>
<p>Using this plugin with version catalogs, your code can be rewritten like this:</p>
Expand All @@ -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"; }
Expand Down Expand Up @@ -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")
}
</code-block>
</chapter>
Expand Down
Loading