Skip to content

Conversation

devcrocod
Copy link
Contributor

@devcrocod devcrocod commented Apr 17, 2025

Adds support for iOS and WASM targets

  • new targets have been added
  • some tests have been moved to the common part

Motivation and Context

#70

How Has This Been Tested?

locally

Breaking Changes

Renamed the public method onInitialized, fixed a typo.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

@devcrocod devcrocod requested a review from Copilot April 17, 2025 12:18
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for iOS and WASM targets while updating concurrency primitives and dependency versions to align with the latest Kotlin and Ktor releases.

  • Added new targets for iOS and WASM.
  • Switched atomic operations from kotlinx.atomicfu to kotlin.concurrent.atomics.
  • Updated Gradle versions for Kotlin, Coroutines, and Ktor, and adjusted imports accordingly.

Reviewed Changes

Copilot reviewed 33 out of 34 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/InMemoryTransport.kt Added package declaration for consistency.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types.util.kt Updated serialization imports and minor spacing adjustments.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/types.kt Migrated atomic operations and updated error class formatting.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/WebSocketMcpTransport.kt Updated AtomicBoolean usage to new API.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ReadBuffer.kt Updated import for I/O extension.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/Protocol.kt Reordered and updated imports without functional changes.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/{WebSocketMcpServerTransport.kt, WebSocketMcpKtorServerExtensions.kt, Server.kt, SSEServerTransport.kt, KtorServer.kt} Adapted server transports and Ktor server integrations to match updated libraries.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/{WebSocketClientTransport.kt, StdioClientTransport.kt, SSEClientTransport.kt, Client.kt} Updated client transports and imports for consistency with new APIs.
gradle/libs.versions.toml Upgraded dependency versions and removed atomicfu dependency.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/internal/utils.kt Added expect declaration for IODispatcher.
Files not reviewed (1)
  • gradle.properties: Language not supported
Comments suppressed due to low confidence (1)

src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StdioServerTransport.kt:127

  • [nitpick] Remove or update the lingering TODO comment to reflect the current cancellation approach and avoid confusion.
readingJob?.cancel() // ToDO("was cancel and join")

@devcrocod devcrocod force-pushed the devcrocod/add-ios-and-wasm branch from 54a3958 to 7525778 Compare April 17, 2025 12:41
@devcrocod devcrocod requested a review from Copilot April 18, 2025 14:02
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for iOS and WASM targets while updating several transport and server modules.

  • New targets (iOS and WASM) have been integrated.
  • Transport implementations have been refactored to use IODispatcher and improved error handling.
  • Minor naming corrections and dependency bumps (coroutines and Ktor) have been applied.

Reviewed Changes

Copilot reviewed 40 out of 44 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/WebSocketMcpServerTransport.kt Replaced wildcard imports with explicit ones for Ktor types.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/WebSocketMcpKtorServerExtensions.kt Updated import style to explicit Ktor imports.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StdioServerTransport.kt Refactored transport cancellation and switched to IODispatcher.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/Server.kt Renamed onInitalized to onInitialized and updated doc comments.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt Modified initialization checks and error messaging for clarity.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt Reorganized routing and updated SSE endpoint imports.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/internal/utils.kt Introduced expect val for IODispatcher.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/WebSocketClientTransport.kt Updated explicit Ktor client imports.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt Switched coroutine context to IODispatcher and updated error handling.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt Refactored initialization checks for SSE clients.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt Updated imports and error messaging for improved clarity.
samples/weather-stdio-server/src/main/kotlin/io/modelcontextprotocol/sample/server/McpWeatherServer.kt Simplified argument extraction for tool calls.
samples/kotlin-mcp-server/src/wasmJsMain/kotlin/main.wasmJs.kt Added a new WASM entry point and command handling.
samples/kotlin-mcp-server/src/jvmMain/kotlin/main.jvm.kt Updated server startup to include stdio and SSE options.
samples/kotlin-mcp-server/src/commonMain/kotlin/server.kt Added server configuration for SSE using both plain and Ktor plugin modes.
gradle/libs.versions.toml Updated coroutines and Ktor versions.
Files not reviewed (4)
  • gradle.properties: Language not supported
  • samples/kotlin-mcp-server/build.gradle.kts: Language not supported
  • samples/kotlin-mcp-server/gradle.properties: Language not supported
  • samples/kotlin-mcp-server/settings.gradle.kts: Language not supported

@devcrocod devcrocod marked this pull request as ready for review April 23, 2025 12:24
@devcrocod devcrocod requested review from e5l, Mr3zee and Copilot April 23, 2025 12:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request adds support for iOS and WebAssembly (WASM) targets while refactoring transport implementations and updating documentation. Key changes include the introduction of new targets, refactoring of coroutine contexts to use IODispatcher for both server and client transports, and the renaming of the public method onInitialized along with minor documentation updates.

Reviewed Changes

Copilot reviewed 41 out of 45 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/WebSocketMcpKtorServerExtensions.kt Updated import statements for explicit type imports.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/StdioServerTransport.kt Refactored coroutine context usage and improved resource and job cancellation in close().
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/Server.kt Renamed onInitalized to onInitialized and updated related documentation comments.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/SSEServerTransport.kt Modified initialization checks and error handling for consistency.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/server/KtorServer.kt Updated to explicit Ktor imports for improved clarity.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/internal/utils.kt Added expect declaration for IODispatcher.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/WebSocketClientTransport.kt Updated client imports for better clarity.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/StdioClientTransport.kt Adopted IODispatcher and updated compareAndSet calls for consistency.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/SSEClientTransport.kt Updated SSE client initialization syntax and imports.
src/commonMain/kotlin/io/modelcontextprotocol/kotlin/sdk/client/Client.kt Improved error handling and updated import statements.
samples/weather-stdio-server/src/main/kotlin/io/modelcontextprotocol/sample/server/McpWeatherServer.kt Simplified null-check logic using the elvis operator.
samples/kotlin-mcp-server (wasmJsMain, jvmMain, commonMain) Added support for WASM along with updated sample server configurations.
gradle/libs.versions.toml Bumped dependency versions for coroutines and Ktor, and removed the coroutines-debug dependency.
.github/workflows/gradle-publish.yml Changed the CI runner from ubuntu-latest to macos-latest.
Files not reviewed (4)
  • gradle.properties: Language not supported
  • samples/kotlin-mcp-server/build.gradle.kts: Language not supported
  • samples/kotlin-mcp-server/gradle.properties: Language not supported
  • samples/kotlin-mcp-server/settings.gradle.kts: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/gradle-publish.yml:16

  • Confirm that switching the CI runner from ubuntu-latest to macos-latest is intentional, as this could affect build environment consistency.
runs-on: macos-latest

Mr3zee
Mr3zee previously approved these changes Apr 23, 2025
@Mr3zee
Copy link
Contributor

Mr3zee commented Apr 23, 2025

@devcrocod thank you!

Copy link
Contributor

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @devcrocod, thanks for the PR.

Could you please rebase your PR on the latest main?

@devcrocod devcrocod force-pushed the devcrocod/add-ios-and-wasm branch from 4b58d20 to 8639089 Compare April 30, 2025 11:07
@devcrocod devcrocod requested a review from e5l April 30, 2025 11:08
@StefMa
Copy link
Contributor

StefMa commented May 6, 2025

Why do we need this as a ios target? 🤔
Wouldn't it make more sense to add macos and Linux as a target instead? 🤔

@e5l
Copy link
Contributor

e5l commented May 6, 2025

Hey @StefMa, the iOS target allows having the MCP server on the phone. Macos also would be useful

e5l
e5l previously approved these changes May 6, 2025
@e5l e5l enabled auto-merge (squash) May 6, 2025 06:35
@github-actions github-actions bot disabled auto-merge May 6, 2025 06:37
@e5l
Copy link
Contributor

e5l commented May 6, 2025

@devcrocod, could you please check the build?



e: file:///home/runner/work/kotlin-sdk/kotlin-sdk/src/commonTest/kotlin/io/modelcontextprotocol/kotlin/sdk/shared/ReadBufferTest.kt:45:44 Unresolved reference 'StandardCharsets'.
> Task :compileTestKotlinWasmJs FAILED

@StefMa
Copy link
Contributor

StefMa commented May 6, 2025

Hey @StefMa, the iOS target allows having the MCP server on the phone. Macos also would be useful

Hehe, yeah sure 🙃.
But this would also require a MCP client on the phone right? This is not (yet) available?!

And how should those app communicate with each other? 🤔
The client should register the server somehow. Since the server should be an iOS App, it should communicate via app links or something right? 🤔

Hmm just thinking about the use care right now. Maybe the problem is also that I am not too deep into MCP yet.

Would be great if you could explain this a bit. ☺️

@devcrocod
Copy link
Contributor Author

Hi @StefMa
It’s possible to create an mcp client on a phone, and the mcp server doesn’t necessarily have to be on the mobile device

@StefMa
Copy link
Contributor

StefMa commented May 28, 2025

Can we merge this? 🤔

@devcrocod
Copy link
Contributor Author

@StefMa  I also want to add js support

@devcrocod devcrocod force-pushed the devcrocod/add-ios-and-wasm branch from efb9597 to 3cbdab1 Compare May 28, 2025 23:36
@devcrocod devcrocod requested a review from e5l May 28, 2025 23:43
Copy link
Contributor

@e5l e5l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @devcrocod, thanks for the PR. LGTM

@e5l e5l enabled auto-merge (squash) May 29, 2025 04:54
@e5l e5l merged commit 0cff2ca into main May 29, 2025
2 of 3 checks passed
@e5l e5l deleted the devcrocod/add-ios-and-wasm branch May 29, 2025 05:01
@thisAAY
Copy link

thisAAY commented Jun 5, 2025

When will this be published?

@e5l
Copy link
Contributor

e5l commented Jun 5, 2025

Hey @thisAAY, we're working on making the release atm

@SamuelMarks
Copy link

3 weeks later! - Any progress on a new release? - Would love to see this 📱

svc-squareup-copybara pushed a commit to cashapp/misk that referenced this pull request Aug 18, 2025
| Package | Type | Package file | Manager | Update | Change |
|---|---|---|---|---|---|
|
[io.modelcontextprotocol:kotlin-sdk](https://github.com/modelcontextprotocol/kotlin-sdk)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`0.5.0` -> `0.6.0` |
|
[org.jetbrains.kotlinx:kotlinx-serialization-json](https://github.com/Kotlin/kotlinx.serialization)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.7.3` -> `1.9.0` |
|
[org.jetbrains.kotlinx:kotlinx-serialization-core](https://github.com/Kotlin/kotlinx.serialization)
| dependencies | misk/gradle/libs.versions.toml | gradle | minor |
`1.7.3` -> `1.9.0` |
|
[com.google.apis:google-api-services-storage](http://nexus.sonatype.org/oss-repository-hosting.html)
([source](http://svn.sonatype.org/spice/tags/oss-parent-7)) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`v1-rev20250718-2.0.0` -> `v1-rev20250814-2.0.0` |
| [software.amazon.awssdk:sdk-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:sqs](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:regions](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
|
[software.amazon.awssdk:dynamodb-enhanced](https://aws.amazon.com/sdkforjava)
| dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:dynamodb](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:aws-core](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:bom](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |
| [software.amazon.awssdk:auth](https://aws.amazon.com/sdkforjava) |
dependencies | misk/gradle/libs.versions.toml | gradle | patch |
`2.32.23` -> `2.32.24` |

---

### Release Notes

<details>
<summary>modelcontextprotocol/kotlin-sdk
(io.modelcontextprotocol:kotlin-sdk)</summary>

###
[`v0.6.0`](https://github.com/modelcontextprotocol/kotlin-sdk/releases/tag/0.6.0)

[Compare
Source](modelcontextprotocol/kotlin-sdk@0.5.0...0.6.0)

#### What's Changed

- Update jreleaser to fix publication issue by
[@&#8203;e5l](https://github.com/e5l) in
modelcontextprotocol/kotlin-sdk#91
- Disable configuration cache to fix jreleaser issue by
[@&#8203;e5l](https://github.com/e5l) in
modelcontextprotocol/kotlin-sdk#92
- feat: Add audio type according to 2025-03-26 spec by
[@&#8203;SeanChinJunKai](https://github.com/SeanChinJunKai) in
modelcontextprotocol/kotlin-sdk#68
- fix(client): serialize inputSchema as input\_schema by
[@&#8203;shiqicao](https://github.com/shiqicao) in
modelcontextprotocol/kotlin-sdk#97
- fix(client) add encodeDefault for field with non spec default value by
[@&#8203;shiqicao](https://github.com/shiqicao) in
modelcontextprotocol/kotlin-sdk#99
- Make McpJson public to allow flexible protocol development by
[@&#8203;parnurzeal](https://github.com/parnurzeal) in
modelcontextprotocol/kotlin-sdk#103
- fix: apply `requestBuilder` headers when sending rpc messages by
[@&#8203;dead8309](https://github.com/dead8309) in
modelcontextprotocol/kotlin-sdk#96
- fix: Remove [@&#8203;SerialName](https://github.com/SerialName)
annotation for inputSchema by
[@&#8203;adamglin0](https://github.com/adamglin0) in
modelcontextprotocol/kotlin-sdk#105
- add ios and wasm targets by
[@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#81
- Add dependabot by [@&#8203;StefMa](https://github.com/StefMa) in
modelcontextprotocol/kotlin-sdk#121
- Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.7.3 to
1.8.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#127
- Bump io.github.oshai:kotlin-logging from 7.0.0 to 7.0.7 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#126
- Bump org.jetbrains.kotlinx.binary-compatibility-validator from 0.17.0
to 0.18.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot]
in modelcontextprotocol/kotlin-sdk#125
- update kotlin to 2.2.0 and ktor to 3.1.3 by
[@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#120
- Add client roots addition/removal API and listRoots handler by
[@&#8203;ptitjes](https://github.com/ptitjes) in
modelcontextprotocol/kotlin-sdk#118
- Bump org.slf4j:slf4j-simple from 2.0.16 to 2.0.17 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#131
- Bump org.jetbrains.kotlinx:kotlinx-serialization-json from 1.8.1 to
1.9.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#132
- Bump io.mockk:mockk from 1.13.13 to 1.14.4 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#133
- Remove fixed suffix /sse by
[@&#8203;adamglin0](https://github.com/adamglin0) in
modelcontextprotocol/kotlin-sdk#108
- sse server does not process endpoint correctly when sse path is not a
directory by [@&#8203;shendaxia-sm](https://github.com/shendaxia-sm) in
modelcontextprotocol/kotlin-sdk#43
- Add labels to dependabot configuration for Kotlin and GitHub Actions
by [@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#135
- feat: add tool annotations according to 2025-03-26 spec by
[@&#8203;SeanChinJunKai](https://github.com/SeanChinJunKai) in
modelcontextprotocol/kotlin-sdk#71
- Bump ktor from 3.1.3 to 3.2.1 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#140
- Bump gradle/actions from 4.0.0 to 4.4.1 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#122
- Bump org.jreleaser from 1.17.0 to 1.19.0 by
[@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#141
- refactor `SseClientTransport` by
[@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#142
- atomic and persistent collections for thread safety by
[@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#143
- Bump org.gradle.toolchains.foojay-resolver-convention from 0.8.0 to
1.0.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in
modelcontextprotocol/kotlin-sdk#130
- Add support for elicitation by
[@&#8203;ptitjes](https://github.com/ptitjes) in
modelcontextprotocol/kotlin-sdk#138
- Add support for tool structured content and output schema by
[@&#8203;ptitjes](https://github.com/ptitjes) in
modelcontextprotocol/kotlin-sdk#146
- Add streamable http client transport by
[@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#147
- Refactor JSON processing to exclude "method" in serialization by
[@&#8203;devcrocod](https://github.com/devcrocod) in
[#&#8203;157](modelcontextprotocol/kotlin-sdk#157)
- Release 0.6.0 by [@&#8203;devcrocod](https://github.com/devcrocod) in
modelcontextprotocol/kotlin-sdk#149

#### New Contributors

- [@&#8203;shiqicao](https://github.com/shiqicao) made their first
contribution in
modelcontextprotocol/kotlin-sdk#97
- [@&#8203;parnurzeal](https://github.com/parnurzeal) made their first
contribution in
modelcontextprotocol/kotlin-sdk#103
- [@&#8203;dead8309](https://github.com/dead8309) made their first
contribution in
modelcontextprotocol/kotlin-sdk#96
- [@&#8203;adamglin0](https://github.com/adamglin0) made their first
contribution in
modelcontextprotocol/kotlin-sdk#105
- [@&#8203;StefMa](https://github.com/StefMa) made their first
contribution in
modelcontextprotocol/kotlin-sdk#121
- [@&#8203;dependabot](https://github.com/dependabot)\[bot] made their
first contribution in
modelcontextprotocol/kotlin-sdk#127
- [@&#8203;ptitjes](https://github.com/ptitjes) made their first
contribution in
modelcontextprotocol/kotlin-sdk#118
- [@&#8203;shendaxia-sm](https://github.com/shendaxia-sm) made their
first contribution in
modelcontextprotocol/kotlin-sdk#43

**Full Changelog**:
modelcontextprotocol/kotlin-sdk@0.5.0...0.6.0

</details>

<details>
<summary>Kotlin/kotlinx.serialization
(org.jetbrains.kotlinx:kotlinx-serialization-json)</summary>

###
[`v1.9.0`](https://github.com/Kotlin/kotlinx.serialization/blob/HEAD/CHANGELOG.md#190--2025-06-27)

\==================

This release updates Kotlin version to 2.2.0, includes several bugfixes
and provides serializers for kotlin.time.Instant.

#### Add kotlin.time.Instant serializers

Instant class was moved from kotlinx-datetime library to Kotlin standard
library.
As a result, kotlinx-datetime 0.7.0 no longer has serializers for the
Instant class.
To use new kotlin.time.Instant class in your
[@&#8203;Serializable](https://github.com/Serializable) classes,
you can use this 1.9.0 kotlinx-serialization version (Kotlin 2.2 is
required).
You can choose between default `InstantSerializer` which uses its string
representation,
or specify `InstantComponentSerializer` that represents instant as its
components.
See details in the
[PR](Kotlin/kotlinx.serialization#2945).

#### Other bugfixes

- Fix resize in JsonPath
([#&#8203;2995](Kotlin/kotlinx.serialization#2995))
- Fixed proguard rules for obfuscation to work correctly
([#&#8203;2983](Kotlin/kotlinx.serialization#2983))

###
[`v1.8.1`](https://github.com/Kotlin/kotlinx.serialization/blob/HEAD/CHANGELOG.md#181--2025-03-31)

\==================

This release updates Kotlin version to 2.1.20, while also providing
several important improvements
and bugfixes.

#### Improvements

- Implemented encoding null in key and value of a map in Protobuf
([#&#8203;2910](Kotlin/kotlinx.serialization#2910))
- Make type argument in JsonTransformingSerializer nullable
([#&#8203;2911](Kotlin/kotlinx.serialization#2911))
- Use SPDX identifier in POMs
([#&#8203;2936](Kotlin/kotlinx.serialization#2936))
(thanks to [Leon Linhart](https://github.com/TheMrMilchmann))
- Add watchosDeviceArm64 to Okio integration module
([#&#8203;2920](Kotlin/kotlinx.serialization#2920))
(thanks to [Daniel Santiago](https://github.com/danysantiago))
- Update kotlinx-io version to 0.6.0
([#&#8203;2933](Kotlin/kotlinx.serialization#2933))
(thanks to [Piotr Krzemiński](https://github.com/krzema12))

#### Bugfixes

- Fix incorrect enum coercion during deserialization from JsonElement
([#&#8203;2962](Kotlin/kotlinx.serialization#2962))
- Supply proper equals(), hashCode(), and toString() for
SerialDescriptor() wrapper
([#&#8203;2942](Kotlin/kotlinx.serialization#2942))
- Do not encode empty packed collections in protobuf
([#&#8203;2907](Kotlin/kotlinx.serialization#2907))

###
[`v1.8.0`](https://github.com/Kotlin/kotlinx.serialization/blob/HEAD/CHANGELOG.md#180--2025-01-06)

\==================

This release contains all of the changes from 1.8.0-RC. Kotlin 2.1.0 is
used as a default, while upcoming 2.1.10 is also supported.
Also added small bugfixes, including speedup of ProtoWireType.from
([#&#8203;2879](Kotlin/kotlinx.serialization#2879)).

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 6pm every weekday,before 2am
every weekday" in timezone Australia/Melbourne, Automerge - At any time
(no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://github.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

GitOrigin-RevId: 40e2f07ecd958e92e64c571d1351e91f96e71ce7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants