Skip to content

Commit 7285ed3

Browse files
authored
Prepare 1.3.0 release
1 parent 5a16c22 commit 7285ed3

File tree

6 files changed

+130
-117
lines changed

6 files changed

+130
-117
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
2+
1.3.0 / 2021-09-23
3+
==================
4+
5+
This release contains all of the cool new features from 1.3.0-RC (see below) as well as minor improvements.
6+
It uses Kotlin 1.5.31 by default.
7+
8+
### Bugfixes and improvements
9+
10+
* Promote JsonConfiguration and its usages to stable (#1690)
11+
* Remove opt-in annotations from SerialFormat, StringFormat, BinaryFormat (#1688)
12+
* CBOR: ignore tags when reading (#1614) (thanks to [David Robertson](https://github.com/DavidJRobertson))
13+
114
1.3.0-RC / 2021-09-06
215
==================
316

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
[![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub)
44
[![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0)
55
[![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)
6-
[![Kotlin](https://img.shields.io/badge/kotlin-1.5.30-blue.svg?logo=kotlin)](http://kotlinlang.org)
7-
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.2.2)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.2.2/pom)
6+
[![Kotlin](https://img.shields.io/badge/kotlin-1.5.31-blue.svg?logo=kotlin)](http://kotlinlang.org)
7+
[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.0)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.0/pom)
88
[![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlin.github.io/kotlinx.serialization/)
99
[![Slack channel](https://img.shields.io/badge/chat-slack-blue.svg?logo=slack)](https://kotlinlang.slack.com/messages/serialization/)
1010

@@ -88,17 +88,17 @@ Kotlin DSL:
8888

8989
```kotlin
9090
plugins {
91-
kotlin("jvm") version "1.5.30" // or kotlin("multiplatform") or any other kotlin plugin
92-
kotlin("plugin.serialization") version "1.5.30"
91+
kotlin("jvm") version "1.5.31" // or kotlin("multiplatform") or any other kotlin plugin
92+
kotlin("plugin.serialization") version "1.5.31"
9393
}
9494
```
9595

9696
Groovy DSL:
9797

9898
```gradle
9999
plugins {
100-
id 'org.jetbrains.kotlin.multiplatform' version '1.5.30'
101-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.30'
100+
id 'org.jetbrains.kotlin.multiplatform' version '1.5.31'
101+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.31'
102102
}
103103
```
104104

@@ -115,7 +115,7 @@ buildscript {
115115
repositories { mavenCentral() }
116116

117117
dependencies {
118-
val kotlinVersion = "1.5.30"
118+
val kotlinVersion = "1.5.31"
119119
classpath(kotlin("gradle-plugin", version = kotlinVersion))
120120
classpath(kotlin("serialization", version = kotlinVersion))
121121
}
@@ -126,7 +126,7 @@ Groovy DSL:
126126

127127
```gradle
128128
buildscript {
129-
ext.kotlin_version = '1.5.30'
129+
ext.kotlin_version = '1.5.31'
130130
repositories { mavenCentral() }
131131
132132
dependencies {
@@ -155,7 +155,7 @@ repositories {
155155
}
156156

157157
dependencies {
158-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2")
158+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0")
159159
}
160160
```
161161

@@ -167,7 +167,7 @@ repositories {
167167
}
168168
169169
dependencies {
170-
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.2.2"
170+
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.0"
171171
}
172172
```
173173

@@ -222,8 +222,8 @@ Ensure the proper version of Kotlin and serialization version:
222222

223223
```xml
224224
<properties>
225-
<kotlin.version>1.5.30</kotlin.version>
226-
<serialization.version>1.2.2</serialization.version>
225+
<kotlin.version>1.5.31</kotlin.version>
226+
<serialization.version>1.3.0</serialization.version>
227227
</properties>
228228
```
229229

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.3.0-SNAPSHOT
6+
version=1.3.1-SNAPSHOT
77

8-
kotlin.version=1.5.30
8+
kotlin.version=1.5.31
99

1010
# This version take precedence if 'bootstrap' property passed to project
1111
kotlin.version.snapshot=1.6.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.5.30
6-
mainLibVersion=1.3.0-SNAPSHOT
5+
mainKotlinVersion=1.5.31
6+
mainLibVersion=1.3.1-SNAPSHOT
77

88
kotlin.code.style=official
99
kotlin.js.compiler=both

integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyModuleB.kt

Lines changed: 56 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -5,59 +5,59 @@ import kotlinx.serialization.Serializable
55

66
@Serializable
77
class EmptyClassB : EmptyBase()
8-
9-
10-
@Serializable
11-
open class Car : Vehicle() {
12-
var maxSpeed: Int = 100
13-
14-
override fun equals(other: Any?): Boolean {
15-
if (this === other) return true
16-
if (other !is Car) return false
17-
if (name != other.name) return false
18-
if (color != other.color) return false
19-
if (maxSpeed != other.maxSpeed) return false
20-
21-
return true
22-
}
23-
24-
override fun hashCode(): Int {
25-
return maxSpeed.hashCode()
26-
}
27-
28-
override fun toString(): String {
29-
return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
30-
}
31-
}
32-
33-
@Serializable
34-
data class TestSnippet(
35-
@SerialName("experiments") val experiments: List<String>
36-
) : Snippet("test", "aaa")
37-
38-
@Serializable
39-
data class ScreenSnippet(
40-
@SerialName("name") val name: String,
41-
@SerialName("uuid") val uuid: String? = null,
42-
@SerialName("source") val source: String? = null
43-
) : Snippet("screen", "aaa")
44-
45-
@Serializable
46-
class NotInConstructorTest : NotInConstructorBase() {
47-
val c = "val c"
48-
49-
override fun equals(other: Any?): Boolean {
50-
if (this === other) return true
51-
if (other !is NotInConstructorTest) return false
52-
53-
if (a != other.a) return false
54-
if (b != other.b) return false
55-
if (c != other.c) return false
56-
57-
return true
58-
}
59-
60-
override fun hashCode(): Int {
61-
return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
62-
}
63-
}
8+
// TODO: Uncomment when https://github.com/Kotlin/kotlinx.serialization/issues/1698 is resolved
9+
//
10+
//@Serializable
11+
//open class Car : Vehicle() {
12+
// var maxSpeed: Int = 100
13+
//
14+
// override fun equals(other: Any?): Boolean {
15+
// if (this === other) return true
16+
// if (other !is Car) return false
17+
// if (name != other.name) return false
18+
// if (color != other.color) return false
19+
// if (maxSpeed != other.maxSpeed) return false
20+
//
21+
// return true
22+
// }
23+
//
24+
// override fun hashCode(): Int {
25+
// return maxSpeed.hashCode()
26+
// }
27+
//
28+
// override fun toString(): String {
29+
// return "Car(name=$name, color=$color, maxSpeed=$maxSpeed)"
30+
// }
31+
//}
32+
//
33+
//@Serializable
34+
//data class TestSnippet(
35+
// @SerialName("experiments") val experiments: List<String>
36+
//) : Snippet("test", "aaa")
37+
//
38+
//@Serializable
39+
//data class ScreenSnippet(
40+
// @SerialName("name") val name: String,
41+
// @SerialName("uuid") val uuid: String? = null,
42+
// @SerialName("source") val source: String? = null
43+
//) : Snippet("screen", "aaa")
44+
//
45+
//@Serializable
46+
//class NotInConstructorTest : NotInConstructorBase() {
47+
// val c = "val c"
48+
//
49+
// override fun equals(other: Any?): Boolean {
50+
// if (this === other) return true
51+
// if (other !is NotInConstructorTest) return false
52+
//
53+
// if (a != other.a) return false
54+
// if (b != other.b) return false
55+
// if (c != other.c) return false
56+
//
57+
// return true
58+
// }
59+
//
60+
// override fun hashCode(): Int {
61+
// return a.hashCode() * 31 + b.hashCode() * 31 + c.hashCode()
62+
// }
63+
//}

integration-test/src/commonTest/kotlin/sample/MultiFileHierarchyTest.kt

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -28,49 +28,49 @@ class AbstractBaseTest {
2828
val parsed: EmptyClassB = Json.decodeFromString(EmptyClassB.serializer(), serialized)
2929
}
3030

31-
@Test
32-
fun testCrossModuleInheritance() {
33-
val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
34-
35-
val car = Car()
36-
car.maxSpeed = 100
37-
car.name = "ford"
38-
val s = json.encodeToString(Car.serializer(), car)
39-
assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
40-
val restoredCar = json.decodeFromString(Car.serializer(), s)
41-
assertEquals(car, restoredCar)
42-
}
43-
44-
@Test
45-
fun testCrossModuleAbstractInheritance() {
46-
val snippetModule = SerializersModule {
47-
polymorphic(Snippet::class) {
48-
subclass(ScreenSnippet.serializer())
49-
subclass(TestSnippet.serializer())
50-
}
51-
}
52-
53-
val json = Json {
54-
serializersModule = snippetModule
55-
encodeDefaults = true
56-
}
57-
58-
val testSnippet = TestSnippet(emptyList())
59-
val screenSnippet = ScreenSnippet("one", "two", "three")
60-
val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
61-
assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
62-
assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
63-
json.encodeToString(TestSnippet.serializer(), testSnippet)
64-
)
65-
assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
66-
screenSnippet,
67-
ScreenSnippet.serializer(),
68-
json
69-
)
70-
}
71-
72-
@Test
73-
fun testPropertiesNotInConstructor() {
74-
assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
75-
}
31+
// @Test
32+
// fun testCrossModuleInheritance() {
33+
// val json = Json { allowStructuredMapKeys = true; encodeDefaults = true }
34+
//
35+
// val car = Car()
36+
// car.maxSpeed = 100
37+
// car.name = "ford"
38+
// val s = json.encodeToString(Car.serializer(), car)
39+
// assertEquals("""{"name":"ford","color":null,"maxSpeed":100}""", s)
40+
// val restoredCar = json.decodeFromString(Car.serializer(), s)
41+
// assertEquals(car, restoredCar)
42+
// }
43+
//
44+
// @Test
45+
// fun testCrossModuleAbstractInheritance() {
46+
// val snippetModule = SerializersModule {
47+
// polymorphic(Snippet::class) {
48+
// subclass(ScreenSnippet.serializer())
49+
// subclass(TestSnippet.serializer())
50+
// }
51+
// }
52+
//
53+
// val json = Json {
54+
// serializersModule = snippetModule
55+
// encodeDefaults = true
56+
// }
57+
//
58+
// val testSnippet = TestSnippet(emptyList())
59+
// val screenSnippet = ScreenSnippet("one", "two", "three")
60+
// val s = json.encodeToString(TestSnippet.serializer(), testSnippet)
61+
// assertEquals(testSnippet, json.decodeFromString(TestSnippet.serializer(), s))
62+
// assertEquals("""{"objectFieldName":"test","aaa":"aaa","experiments":[]}""",
63+
// json.encodeToString(TestSnippet.serializer(), testSnippet)
64+
// )
65+
// assertStringFormAndRestored("""{"objectFieldName":"screen","aaa":"aaa","name":"one","uuid":"two","source":"three"}""",
66+
// screenSnippet,
67+
// ScreenSnippet.serializer(),
68+
// json
69+
// )
70+
// }
71+
//
72+
// @Test
73+
// fun testPropertiesNotInConstructor() {
74+
// assertStringFormAndRestored("""{"b":"val b","a":"val a","c":"val c"}""", NotInConstructorTest(), NotInConstructorTest.serializer())
75+
// }
7676
}

0 commit comments

Comments
 (0)