Update changelog and migration guide of kotlin-metadata-jvm

To accommodate for a future stable release as a part of Kotlin distribution.

See also: KT-63156, KT-63161, and KT-63219
This commit is contained in:
Leonid Startsev
2024-03-07 15:37:34 +01:00
committed by Space Team
parent cc343d7fb3
commit 75c87dd858
2 changed files with 38 additions and 1 deletions
@@ -1,5 +1,18 @@
# kotlinx-metadata-jvm
## 2.0.0 and higher
Starting with Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is a part of Kotlin distribution now.
It means that it has the same versioning as Kotlin compiler and Kotlin standard library, and the same release cycle.
To achieve this, coordinates of the library were changed: it is now in `org.jetbrains.kotlin` group with `kotlin-metadata-jvm` id (notice
the drop of `X` from the coordinates).
This also means that the root package was changed from `kotlinx.metadata` to `kotlin.metadata`.
Among other noticeable changes, all previously deprecated declarations were removed from the library.
In case you need to perform a migration with aid, migrate your project to 0.9.0 version first using [migration guide](Migration.md).
This is the last entry of this changelog. General changelog for Kotlin's `Libraries` subsystem is available in the `ChangeLog.md` at the repository root.
## 0.9.0
The main purpose of this release is to promote all previous deprecations to ERROR level if they were not already.
+25 -1
View File
@@ -3,7 +3,31 @@
Starting with 0.6.0 release, Kotlin team is focused on revisiting and improving kotlinx-metadata-jvm API, with an aim to provide a stable release
in the near future. As a result, the API was reshaped, with cuts here and there, so we've provided a migration guide to help you with updates.
## Migrating from 0.7.0 to 0.8.0 and above
Starting with the 2.0 release, the library is considered stable and will be evolving in a backwards compatible way.
## Migrating from 0.9.0 to stable (2.x.x)
Starting with Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is a part of Kotlin distribution now.
Therefore, library coordinates and package were changed.
To migrate, one needs to perform three simple steps:
1. Make sure that you do not use any deprecated APIs, as they were removed completely in the stable version.
To migrate from deprecated APIs, study the migration guide for previous versions.
If you used version lower than 0.9.0 before, we advise you to perform two step migration: first, upgrade to 0.9.0, and after
resolving all deprecation errors, upgrade to stable 2.x.
2. Change coordinates of the library in your dependency declarations. The new coordinates are `org.jetbrains.kotlin:kotlin-metadata-jvm`.
For example: `implementation("org.jetbrains.kotlin:kotlin-metadata-jvm:2.0.0-RC")`
3. Update imports in your code so they are pointing to correct package.
Change `import kotlinx.metadata` to `import kotlin.metadata`, `import kotlinx.metadata.jvm` to `import kotlin.metadata.jvm`, and so on.
As declarations themselves were not changed, this should be straightforward.
## Migrating from 0.8.0 to 0.9.0
There are no new deprecated or removed APIs in 0.9.0. The main difference with 0.8.0 is that deprecations that were warnings
report errors in 0.9.0. Study the migration guide for previous versions to learn how to get rid of usages of deprecated APIs.
## Migrating from 0.7.0 to 0.8.0
### Choosing between read methods