Skip to content

Commit f833852

Browse files
authored
Prepare 1.5.1 release (#2297)
- Add changelog - Update to Kotlin 1.8.21 - Update api dump - Update yarn lock - Update Gradle in integration test
1 parent a27e86f commit f833852

File tree

11 files changed

+907
-40
lines changed

11 files changed

+907
-40
lines changed

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
2+
1.5.1 / 2023-05-11
3+
==================
4+
This release contains an important Native targets overhaul, as well as numerous enhancements and bugfixes.
5+
Kotlin 1.8.21 is used by default.
6+
7+
### New set of Native targets
8+
9+
The official [Kotlin target support policy](https://kotlinlang.org/docs/native-target-support.html) has recently been published
10+
describing new target policy: each target belongs to a certain _tier_, and different tiers have different stability guarantees.
11+
The official recommendation for library authors is to support targets up to Tier 3,
12+
and kotlinx.serialization now follows it.
13+
It means that in this release, there are a lot of new targets added from this tier,
14+
such as `androidNativeX86` or `watchosDeviceArm64`.
15+
Note that since they belong to Tier 3, they're not auto-tested on CI.
16+
17+
kotlinx.serialization also ships some deprecated Kotlin/Native targets that do not belong to any tier (e.g. `iosArm32`, `mingwX86`).
18+
We'll continue to release them, but we do not provide support for them, nor do we plan to add new targets from the deprecated list.
19+
20+
### Improvements in Json elements
21+
22+
There are two new function sets that should make creating raw Json elements easier.
23+
[First one](https://github.com/Kotlin/kotlinx.serialization/pull/2160) contains overloads for `JsonPrimitive` constructor-like function
24+
that accept unsigned types: `JsonPrimitive(1u)`.
25+
[Second one](https://github.com/Kotlin/kotlinx.serialization/pull/2156) adds new `addAll` functions to `JsonArrayBuilder` to be used with collections
26+
of numbers, booleans or strings: `buildJsonArray { addAll(listOf(1, 2, 3)) }`
27+
Both were contributed to us by [aSemy](https://github.com/aSemy).
28+
29+
### Other enhancements
30+
31+
* **Potential source-breaking change**: Rename json-okio `target` variables to `sink` (#2226)
32+
* Function to retrieve KSerializer by KClass and type arguments serializers (#2291)
33+
* Added FormatLanguage annotation to Json methods (#2234)
34+
* Properties Format: Support sealed/polymorphic classes as class properties (#2255)
35+
36+
### Bugfixes
37+
38+
* KeyValueSerializer: Fix missing call to endStructure() (#2272)
39+
* ObjectSerializer: Respect sequential decoding (#2273)
40+
* Fix value class encoding in various corner cases (#2242)
41+
* Fix incorrect json decoding iterator's .hasNext() behavior on array-wrapped inputs (#2268)
42+
* Fix memory leak caused by invalid KTypeWrapper's equals method (#2274)
43+
* Fixed NoSuchMethodError when parsing a JSON stream on Java 8 (#2219)
44+
* Fix MissingFieldException duplication (#2213)
45+
46+
147
1.5.0 / 2023-02-27
248
==================
349

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
[![JetBrains official project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
55
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
66
[![TeamCity build](https://img.shields.io/teamcity/http/teamcity.jetbrains.com/s/KotlinTools_KotlinxSerialization_Ko.svg)](https://teamcity.jetbrains.com/viewType.html?buildTypeId=KotlinTools_KotlinxSerialization_Ko&guest=1)
7-
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.10-blue.svg?logo=kotlin)](http://kotlinlang.org)
8-
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.5.0)](https://central.sonatype.com/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.5.0)
7+
[![Kotlin](https://img.shields.io/badge/kotlin-1.8.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
8+
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.5.1)](https://central.sonatype.com/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.5.1)
99
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlinlang.org/api/kotlinx.serialization/)
1010
[![Slack channel](https://img.shields.io/badge/chat-slack-blue.svg?logo=slack)](https://kotlinlang.slack.com/messages/serialization/)
1111

@@ -92,17 +92,17 @@ Kotlin DSL:
9292

9393
```kotlin
9494
plugins {
95-
kotlin("jvm") version "1.8.10" // or kotlin("multiplatform") or any other kotlin plugin
96-
kotlin("plugin.serialization") version "1.8.10"
95+
kotlin("jvm") version "1.8.21" // or kotlin("multiplatform") or any other kotlin plugin
96+
kotlin("plugin.serialization") version "1.8.21"
9797
}
9898
```
9999

100100
Groovy DSL:
101101

102102
```gradle
103103
plugins {
104-
id 'org.jetbrains.kotlin.multiplatform' version '1.8.10'
105-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.10'
104+
id 'org.jetbrains.kotlin.multiplatform' version '1.8.21'
105+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.8.21'
106106
}
107107
```
108108

@@ -119,7 +119,7 @@ buildscript {
119119
repositories { mavenCentral() }
120120

121121
dependencies {
122-
val kotlinVersion = "1.8.10"
122+
val kotlinVersion = "1.8.21"
123123
classpath(kotlin("gradle-plugin", version = kotlinVersion))
124124
classpath(kotlin("serialization", version = kotlinVersion))
125125
}
@@ -130,7 +130,7 @@ Groovy DSL:
130130

131131
```gradle
132132
buildscript {
133-
ext.kotlin_version = '1.8.10'
133+
ext.kotlin_version = '1.8.21'
134134
repositories { mavenCentral() }
135135
136136
dependencies {
@@ -159,7 +159,7 @@ repositories {
159159
}
160160

161161
dependencies {
162-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0")
162+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1")
163163
}
164164
```
165165

@@ -171,7 +171,7 @@ repositories {
171171
}
172172
173173
dependencies {
174-
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
174+
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1"
175175
}
176176
```
177177

@@ -261,8 +261,8 @@ Ensure the proper version of Kotlin and serialization version:
261261

262262
```xml
263263
<properties>
264-
<kotlin.version>1.8.10</kotlin.version>
265-
<serialization.version>1.5.0</serialization.version>
264+
<kotlin.version>1.8.21</kotlin.version>
265+
<serialization.version>1.5.1</serialization.version>
266266
</properties>
267267
```
268268

core/commonTest/src/kotlinx/serialization/EnumDescriptorsTest.kt

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,8 @@ class EnumDescriptorsTest {
7575
}
7676

7777
private fun assertFullyAnnotated(descriptor: SerialDescriptor) {
78-
// plugin changes are expected, delete and uncomment when this condition will fail
79-
assertEquals(0, descriptor.annotations.size)
80-
// assertEquals(1, descriptor.annotations.size)
81-
// assertEquals("On Class", (descriptor.annotations.first() as SerialAnnotation).text)
78+
assertEquals(1, descriptor.annotations.size)
79+
assertEquals("On Class", (descriptor.annotations.first() as SerialAnnotation).text)
8280

8381
assertEquals(1, descriptor.getElementAnnotations(0).size)
8482
assertEquals("On A", (descriptor.getElementAnnotations(0).first() as SerialAnnotation).text)
@@ -96,10 +94,8 @@ class EnumDescriptorsTest {
9694
}
9795

9896
private fun assertClassAnnotated(descriptor: SerialDescriptor) {
99-
// plugin changes are expected, delete and uncomment when this condition will fail
100-
assertEquals(0, descriptor.annotations.size)
101-
// assertEquals(1, descriptor.annotations.size)
102-
// assertEquals("On Class", (descriptor.annotations.first() as SerialAnnotation).text)
97+
assertEquals(1, descriptor.annotations.size)
98+
assertEquals("On Class", (descriptor.annotations.first() as SerialAnnotation).text)
10399
}
104100

105101
}

formats/cbor/api/kotlinx-serialization-cbor.api

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
public abstract interface annotation class kotlinx/serialization/cbor/ByteString : java/lang/annotation/Annotation {
22
}
33

4-
public final class kotlinx/serialization/cbor/ByteString$Impl : kotlinx/serialization/cbor/ByteString {
4+
public synthetic class kotlinx/serialization/cbor/ByteString$Impl : kotlinx/serialization/cbor/ByteString {
55
public fun <init> ()V
66
}
77

formats/json/api/kotlinx-serialization-json.api

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public abstract interface annotation class kotlinx/serialization/json/JsonClassD
118118
public abstract fun discriminator ()Ljava/lang/String;
119119
}
120120

121-
public final class kotlinx/serialization/json/JsonClassDiscriminator$Impl : kotlinx/serialization/json/JsonClassDiscriminator {
121+
public synthetic class kotlinx/serialization/json/JsonClassDiscriminator$Impl : kotlinx/serialization/json/JsonClassDiscriminator {
122122
public fun <init> (Ljava/lang/String;)V
123123
public final synthetic fun discriminator ()Ljava/lang/String;
124124
}
@@ -248,7 +248,7 @@ public abstract interface annotation class kotlinx/serialization/json/JsonNames
248248
public abstract fun names ()[Ljava/lang/String;
249249
}
250250

251-
public final class kotlinx/serialization/json/JsonNames$Impl : kotlinx/serialization/json/JsonNames {
251+
public synthetic class kotlinx/serialization/json/JsonNames$Impl : kotlinx/serialization/json/JsonNames {
252252
public fun <init> ([Ljava/lang/String;)V
253253
public final synthetic fun names ()[Ljava/lang/String;
254254
}

formats/protobuf/api/kotlinx-serialization-protobuf.api

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ public abstract interface annotation class kotlinx/serialization/protobuf/ProtoN
3333
public abstract fun number ()I
3434
}
3535

36-
public final class kotlinx/serialization/protobuf/ProtoNumber$Impl : kotlinx/serialization/protobuf/ProtoNumber {
36+
public synthetic class kotlinx/serialization/protobuf/ProtoNumber$Impl : kotlinx/serialization/protobuf/ProtoNumber {
3737
public fun <init> (I)V
3838
public final synthetic fun number ()I
3939
}
4040

4141
public abstract interface annotation class kotlinx/serialization/protobuf/ProtoPacked : java/lang/annotation/Annotation {
4242
}
4343

44-
public final class kotlinx/serialization/protobuf/ProtoPacked$Impl : kotlinx/serialization/protobuf/ProtoPacked {
44+
public synthetic class kotlinx/serialization/protobuf/ProtoPacked$Impl : kotlinx/serialization/protobuf/ProtoPacked {
4545
public fun <init> ()V
4646
}
4747

4848
public abstract interface annotation class kotlinx/serialization/protobuf/ProtoType : java/lang/annotation/Annotation {
4949
public abstract fun type ()Lkotlinx/serialization/protobuf/ProtoIntegerType;
5050
}
5151

52-
public final class kotlinx/serialization/protobuf/ProtoType$Impl : kotlinx/serialization/protobuf/ProtoType {
52+
public synthetic class kotlinx/serialization/protobuf/ProtoType$Impl : kotlinx/serialization/protobuf/ProtoType {
5353
public fun <init> (Lkotlinx/serialization/protobuf/ProtoIntegerType;)V
5454
public final synthetic fun type ()Lkotlinx/serialization/protobuf/ProtoIntegerType;
5555
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
#
44

55
group=org.jetbrains.kotlinx
6-
version=1.5.1-SNAPSHOT
6+
version=1.5.2-SNAPSHOT
77

8-
kotlin.version=1.8.10
8+
kotlin.version=1.8.21
99

1010
# This version takes precedence if 'bootstrap' property passed to project
1111
kotlin.version.snapshot=1.9.255-SNAPSHOT

integration-test/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Copyright 2017-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
33
#
44

5-
mainKotlinVersion=1.8.10
6-
mainLibVersion=1.5.1-SNAPSHOT
5+
mainKotlinVersion=1.8.21
6+
mainLibVersion=1.5.2-SNAPSHOT
77

88
kotlin.code.style=official
99
kotlin.js.compiler=ir
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)