Skip to content

Commit 549b9cc

Browse files
authored
Prepare RC2 release (#1087)
Update to Kotlin 1.4.10
1 parent c041c2c commit 549b9cc

File tree

5 files changed

+69
-17
lines changed

5 files changed

+69
-17
lines changed

CHANGELOG.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
1.0.0-RC2 / 2020-09-21
2+
==================
3+
4+
Second release candidate for 1.0.0 version. This RC contains tweaks and changes based on users feedback after 1.0.0-RC.
5+
6+
### Major changes
7+
8+
* JSON format is now located in different artifact (#994)
9+
10+
In 1.0.0-RC, the `kotlinx-serialization-core` artifact contained core serialization entities as well as `Json` serial format.
11+
We've decided to change that and to make `core` format-agnostic.
12+
It would make the life easier for those who use other serial formats and also make possible to write your own implementation of JSON
13+
or another format without unnecessary dependency on the default one.
14+
15+
In 1.0.0-RC2, `Json` class and related entities are located in `kotlinx-serialization-json` artifact.
16+
To migrate, simply replace `kotlinx-serialization-core` dependency with `-json`. Core library then will be included automatically
17+
as the transitive dependency.
18+
19+
For most use-cases, you should use new `kotlinx-serialization-json` artifact. Use `kotlinx-serialization-core` if you are
20+
writing a library that depends on kotlinx.serialization in a format-agnostic way of provides its own serial format.
21+
22+
* `encodeDefaults` flag is now set to `false` in the default configuration for JSON, CBOR and Protocol Buffers.
23+
24+
The change is motivated by the fact that in most real-life scenarios, this flag is set to `false` anyway,
25+
because such configuration reduces visual clutter and saves amount of data being serialized.
26+
Other libraries, like GSON and Moshi, also have this behavior by default.
27+
28+
This may change how your serialized data looks like, if you have not set value for `encodeDefaults` flag explicitly.
29+
We anticipate that most users already had done this, so no migration is required.
30+
In case you need to return to the old behavior, simply add `encodeDefaults = true` to your configuration while creating `Json/Cbor/ProtoBuf` object.
31+
32+
* Move `Json.encodeToDynamic/Json.decodeFromDynamic` functions to json package
33+
34+
Since these functions are no longer exposed via `DynamicObjectParser/Serializer` and they are now `Json` class extensions,
35+
they should be moved to `kotlinx.serialization.json` package.
36+
To migrate, simply add `import kotlinx.serialization.json.*` to your files.
37+
38+
39+
### Bugfixes and improvements
40+
41+
* Do not provide default implementation for serializersModule in AbstractEncoder/Decoder (#1089)
42+
* Support JsonElement hierarchy in `dynamic` encoding/decoding (#1080)
43+
* Support top-level primitives and primitive map keys in `dynamic` encoding/decoding
44+
* Change core annotations retention (#1083)
45+
* Fix 'Duplicate class ... found in modules' on Gradle != 6.1.1 (#996)
46+
* Various documentation clarifications
47+
* Support deserialization of top-level nullable types (#1038)
48+
* Make most serialization exceptions eligible for coroutines exception recovery (#1054)
49+
* Get rid of methods that do not present in Android API<24 (#1013, #1040)
50+
* Throw JsonDecodingException on empty string literal at the end of the input (#1011)
51+
* Remove new lines in deprecation warnings that caused errors in ObjC interop (#990)
52+
153
1.0.0-RC / 2020-08-17
254
==================
355

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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-
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.serialization.runtime/images/download.svg?version=1.0.0-RC) ](https://bintray.com/kotlin/kotlinx/kotlinx.serialization.runtime/1.0.0-RC)
6+
[![Download](https://api.bintray.com/packages/kotlin/kotlinx/kotlinx.serialization.runtime/images/download.svg?version=1.0.0-RC2) ](https://bintray.com/kotlin/kotlinx/kotlinx.serialization.runtime/1.0.0-RC2)
77

88
Kotlin serialization consists of a compiler plugin, that generates visitor code for serializable classes,
99
runtime library with core serialization API and support libraries with various serialization formats.
@@ -79,17 +79,17 @@ Kotlin DSL:
7979

8080
```kotlin
8181
plugins {
82-
kotlin("jvm") version "1.4.0" // or kotlin("multiplatform") or any other kotlin plugin
83-
kotlin("plugin.serialization") version "1.4.0"
82+
kotlin("jvm") version "1.4.10" // or kotlin("multiplatform") or any other kotlin plugin
83+
kotlin("plugin.serialization") version "1.4.10"
8484
}
8585
```
8686

8787
Groovy DSL:
8888

8989
```gradle
9090
plugins {
91-
id 'org.jetbrains.kotlin.multiplatform' version '1.4.0'
92-
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.0'
91+
id 'org.jetbrains.kotlin.multiplatform' version '1.4.10'
92+
id 'org.jetbrains.kotlin.plugin.serialization' version '1.4.10'
9393
}
9494
```
9595

@@ -106,7 +106,7 @@ buildscript {
106106
repositories { jcenter() }
107107

108108
dependencies {
109-
val kotlinVersion = "1.4.0"
109+
val kotlinVersion = "1.4.10"
110110
classpath(kotlin("gradle-plugin", version = kotlinVersion))
111111
classpath(kotlin("serialization", version = kotlinVersion))
112112
}
@@ -117,7 +117,7 @@ Groovy DSL:
117117

118118
```gradle
119119
buildscript {
120-
ext.kotlin_version = '1.4.0'
120+
ext.kotlin_version = '1.4.10'
121121
repositories { jcenter() }
122122
123123
dependencies {
@@ -147,7 +147,7 @@ repositories {
147147

148148
dependencies {
149149
implementation(kotlin("stdlib", KotlinCompilerVersion.VERSION)) // or "stdlib-jdk8"
150-
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0-RC") // JVM dependency
150+
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0-RC2") // JVM dependency
151151
}
152152
```
153153

@@ -160,7 +160,7 @@ repositories {
160160
161161
dependencies {
162162
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" // or "kotlin-stdlib-jdk8"
163-
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0-RC" // JVM dependency
163+
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.0.0-RC2" // JVM dependency
164164
}
165165
```
166166

@@ -205,8 +205,8 @@ Ensure the proper version of Kotlin and serialization version:
205205

206206
```xml
207207
<properties>
208-
<kotlin.version>1.4.0</kotlin.version>
209-
<serialization.version>1.0.0-RC</serialization.version>
208+
<kotlin.version>1.4.10</kotlin.version>
209+
<serialization.version>1.0.0-RC2</serialization.version>
210210
</properties>
211211
```
212212

docs/compatibility.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note that content of this document is applicable only for JVM platform,
66
since Kotlin/Native and Kotlin/JS are experimental themselves and currently do not impose any backward-compatibility guarantees.
77

88
- [Core library compatibility](#core-library-compatibility)
9-
* [General (Stable) API](#general-stable-api)
9+
* [General (Stable) API](#stable-api)
1010
* [Experimental API](#experimental-api)
1111
* [Internal API](#internal-api)
1212
- [Compatibility with Kotlin compiler plugin](#compatibility-with-kotlin-compiler-plugin)
@@ -70,7 +70,7 @@ In such a case, please create an issue on GitHub in order for us to understand a
7070

7171
`kotlinx.serialization` also has the compiler plugin, that generates code depending on the core library.
7272
Therefore, the compiler plugin should be compatible with the runtime library to work.
73-
Kotlin & `kotlinx.serialization` plugin 1.4.0 are compatible with 1.0.0 runtime library.
73+
Kotlin & `kotlinx.serialization` plugin 1.4.0/1.4.10 are compatible with 1.0.0 runtime library.
7474

7575
For further updates, we have the following policy:
7676

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.0.0-RC
6+
version=1.0.0-RC2
77

8-
kotlin.version=1.4.0
8+
kotlin.version=1.4.10
99

1010
# This version take precedence if 'bootstrap' property passed to project
1111
kotlin.version.snapshot=1.4.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.4.0
6-
mainLibVersion=1.0.0-RC
5+
mainKotlinVersion=1.4.10
6+
mainLibVersion=1.0.0-RC2
77

88
kotlin.code.style=official
99

0 commit comments

Comments
 (0)