---
source_url: https://www.pubnub.com/docs/sdks/kotlin/migration-guides/kotlin-v10-migration-guide
title: Java/Kotlin SDK 10.0.0 migration guide
updated_at: 2026-05-29T11:11:15.426Z
sdk_name: PubNub Kotlin SDK
sdk_version: 13.4.0
---

> Documentation Index
> For a curated overview of PubNub documentation, see: https://www.pubnub.com/docs/llms.txt
> For the full list of all documentation pages, see: https://www.pubnub.com/docs/llms-full.txt


# Java/Kotlin SDK 10.0.0 migration guide

PubNub Kotlin SDK, use the latest version: 13.4.0

Install:

```bash
Add PubNub dependency to your build@13.4.0
```

The v10.0.0 release of Java and Kotlin SDKs builds on the unified codebase. Both SDKs share one implementation. You get feature parity and synchronized releases. You can use both SDKs in one app and receive features and fixes together.

:::tip Unified codebase release
Read the [Java/Kotlin SDK v9.0.0 migration guide](https://www.pubnub.com/docs/sdks/kotlin/migration-guides/kotlin-v9-migration-guide) for details on moving to v9.0.0.
:::

We kept the API surface close to v9.x.x. To upgrade to [Java](https://www.pubnub.com/docs/sdks/java) or [Kotlin](https://www.pubnub.com/docs/sdks/kotlin) v10.0.0, make a few focused updates to how your app uses PubNub.

First, review the changes that need your attention.

Most notable changes include:

* Java SDK only: Some package names changed from com.pubnub.api.* to com.pubnub.api.java.*. This lets you use Kotlin and Java SDKs in one app. Use the migration script to update imports. PNConfiguration class in JavaFrom v10.0.0 of the Java SDK, the correct import for PNConfiguration is com.pubnub.api.java.v2.PNConfiguration.
* Improved null safety. PatchValue<T> for optional fields shows whether a value is unset or null. For example, PatchValue.of(value) sets a value. PatchValue.unset() clears it.
* Removed mutable PNConfiguration classes. They were deprecated in earlier releases.

This guide summarizes differences and the steps to migrate to Java/Kotlin SDK v10.0.0.

## Differences between 9.x.x and 10.0.0

For API details, see the [Java](https://www.pubnub.com/docs/sdks/java) and [Kotlin](https://www.pubnub.com/docs/sdks/kotlin) SDK documentation.

See the major differences between the versions:

| Feature/Method/Field | Java/Kotlin SDK `9.x.x` | Java/Kotlin SDK `10.x.x` |
| --- | --- | --- |
| `PNChannelMetadata` optional field types | `String` or `Any` | `PatchValue<String>` or `PatchValue<Any>` |
| `PNUUIDMetadata` optional field types | `String` or `Any` | `PatchValue<String>` or `PatchValue<Any>` |
| `PNChannelMembership` `custom` and `status` field types | `Map<String, Any?>` or `String?` | `PatchValue<Map<String, Any?>?>?` or `PatchValue<String?>?` |
| `PNMember` `custom` and `status` field types | `Map<String, Any?>` or `String?` | `PatchValue<Map<String, Any?>?>?` or `PatchValue<String?>?` |
| `PNSetMembershipEvent` `custom` and `status` field types | `Map<String, Any?>` or `String?` | `PatchValue<Map<String, Any?>?>?` or `PatchValue<String?>?` |
| [Mutable PNConfiguration](#mutable-pnconfiguration) | `com.pubnub.api.PNConfiguration` | `com.pubnub.api.v2.PNConfiguration.builder(...)` |
| [Some Java package names](#java-sdk-package-names) | `com.pubnub.api.*` | `com.pubnub.api.java.*` |

## Mutable PNConfiguration

Mutable `PNConfiguration` classes deprecated in previous releases are removed. Use [builders](https://www.pubnub.com/docs/sdks/kotlin/api-reference/configuration#configuration).

To change values at runtime, use [value overrides](https://www.pubnub.com/docs/sdks/kotlin/api-reference/configuration#value-override).

## Java SDK package names

We provide a migration script. It scans `.java` and `.kt` files in a chosen directory. It updates package names for classes moved to `com.pubnub.api.java.*` in PubNub Java SDK v10.0.0.

:::note Package names
Not all classes moved. Use the migration script to change package names safely.
:::

When you run the script, it creates a `{filename}.bck` backup for each changed file. You can disable this behavior.

:::warning Backup
Backups are best effort. Ensure you keep your data safe during migration.
:::

### Download the script

Download the script from [GitHub](https://github.com/pubnub/kotlin/releases/download/kotlin-v10.0.0/migration_utils.zip).

### Run the script

To run the script:

1. Extract the downloaded .zip to a directory, for example update_script.
2. Go to updated_script/bin/migration_utils and run migration_utils: migration_utils --dry-run --no-backups {path/to/your/Java/project} The script accepts: * requiredParameterDescription--dry-runRuns without changing files. Prints the files that would change.--no-backupsDisables creating .bck backups for changed files.-h, --helpShows help and exits.{path/to/your/Java/project} *Path to your Java project.

### Example

If your Java project is at `~/projects/my_java_pubnub_project`, run:

```bash
migration_utils ~/projects/my_java_pubnub_project
```

## Migration steps

To migrate from Java/Kotlin SDK `9.x.x` to `10.0.0`, upgrade your SDK, review the differences above, and update your code.

## Terms in this document

* **PubNub** - PubNub is a real-time messaging platform that provides APIs and SDKs for building scalable applications. It handles the complex infrastructure of real-time communication, including: Message delivery and persistence, Presence detection, Access control, Push notifications, File sharing, Serverless processing with Functions and Events & Actions, Analytics and monitoring with BizOps Workspace, AI-powered insights with Illuminate.