From 15a4dd2e8306a086672671c1babcb788d3823a43 Mon Sep 17 00:00:00 2001 From: Leonid Startsev Date: Thu, 23 Dec 2021 18:13:27 +0300 Subject: [PATCH] Prepare 1.3.2 release --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++ README.md | 24 ++++++++++----------- gradle.properties | 2 +- integration-test/gradle.properties | 2 +- 4 files changed, 48 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed22b8e30..0e3155d35 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,37 @@ +1.3.2 / 2021-12-23 +================== + +This release contains several features and bugfixes for core API as well as for HOCON format. +It uses Kotlin 1.6.10 by default. + +### Serializing objects to HOCON + +It's now possible to encode Kotlin objects to `Config` values with new `Hocon.encodeToConfig` function. +This feature may help edit existing configs inside Kotlin program or generate new ones. + +Big thanks to [Osip Fatkullin](https://github.com/osipxd) for [implementing](https://github.com/Kotlin/kotlinx.serialization/pull/1740) this. + +### Polymorphic default serializers + +As of now, `polymorphicDefault` clause inside `SerializersModule { }` builder specifies a +fallback serializer to be used only during deserialization process. A new function has been introduced to allow setting +fallback serializer for serialization: `polymorphicDefaultSerializer`. +This function should ease serializing vast hierarchies of third-party or Java classes. + +Note that there are two new experimental functions, `polymorphicDefaultSerializer` and `polymorphicDefaultDeserializer`. +To avoid naming confusion, we are going to deprecate `polymorphicDefault` in favor of `polymorphicDefaultDeserializer` in the next minor release (1.4.0). + +Credit for [the PR](https://github.com/Kotlin/kotlinx.serialization/pull/1686) goes to our contributor [Joseph Burton](https://github.com/Earthcomputer). + +### Other improvements + + * HOCON: parse strings into integers and booleans if possible (#1795) (thanks to [tobiaslieber](https://github.com/tobiaslieber)) + * Add an encodeCollection extensions (#1749) (thanks to [Nicklas Ansman Giertz](https://github.com/ansman)) + +### Bugfixes + + * Properly handle top-level value classes in encodeToJsonElement (#1777) + * Fix incorrect handling of object end when JsonTreeReader (JsonElement) is used with decodeToSequence (#1782) 1.3.1 / 2021-11-11 ================== diff --git a/README.md b/README.md index acb449cc7..d4e257e55 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ [![official JetBrains project](https://jb.gg/badges/official.svg)](https://confluence.jetbrains.com/display/ALL/JetBrains+on+GitHub) [![GitHub license](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg?style=flat)](http://www.apache.org/licenses/LICENSE-2.0) [![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) -[![Kotlin](https://img.shields.io/badge/kotlin-1.5.31-blue.svg?logo=kotlin)](http://kotlinlang.org) -[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.1)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.1/pom) +[![Kotlin](https://img.shields.io/badge/kotlin-1.6.10-blue.svg?logo=kotlin)](http://kotlinlang.org) +[![Maven Central](https://img.shields.io/maven-central/v/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.2)](https://search.maven.org/artifact/org.jetbrains.kotlinx/kotlinx-serialization-core/1.3.2/pom) [![KDoc link](https://img.shields.io/badge/API_reference-KDoc-blue)](https://kotlin.github.io/kotlinx.serialization/) [![Slack channel](https://img.shields.io/badge/chat-slack-blue.svg?logo=slack)](https://kotlinlang.slack.com/messages/serialization/) @@ -88,8 +88,8 @@ Kotlin DSL: ```kotlin plugins { - kotlin("jvm") version "1.5.31" // or kotlin("multiplatform") or any other kotlin plugin - kotlin("plugin.serialization") version "1.5.31" + kotlin("jvm") version "1.6.10" // or kotlin("multiplatform") or any other kotlin plugin + kotlin("plugin.serialization") version "1.6.10" } ``` @@ -97,8 +97,8 @@ Groovy DSL: ```gradle plugins { - id 'org.jetbrains.kotlin.multiplatform' version '1.5.31' - id 'org.jetbrains.kotlin.plugin.serialization' version '1.5.31' + id 'org.jetbrains.kotlin.multiplatform' version '1.6.10' + id 'org.jetbrains.kotlin.plugin.serialization' version '1.6.10' } ``` @@ -115,7 +115,7 @@ buildscript { repositories { mavenCentral() } dependencies { - val kotlinVersion = "1.5.31" + val kotlinVersion = "1.6.10" classpath(kotlin("gradle-plugin", version = kotlinVersion)) classpath(kotlin("serialization", version = kotlinVersion)) } @@ -126,7 +126,7 @@ Groovy DSL: ```gradle buildscript { - ext.kotlin_version = '1.5.31' + ext.kotlin_version = '1.6.10' repositories { mavenCentral() } dependencies { @@ -155,7 +155,7 @@ repositories { } dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2") } ``` @@ -167,7 +167,7 @@ repositories { } dependencies { - implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.1" + implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2" } ``` @@ -285,8 +285,8 @@ Ensure the proper version of Kotlin and serialization version: ```xml - 1.5.31 - 1.3.1 + 1.6.10 + 1.3.2 ``` diff --git a/gradle.properties b/gradle.properties index fe696419f..45ce63eab 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ # group=org.jetbrains.kotlinx -version=1.3.2-SNAPSHOT +version=1.3.3-SNAPSHOT kotlin.version=1.6.10 diff --git a/integration-test/gradle.properties b/integration-test/gradle.properties index d0c3b4a0f..5ace7a50e 100644 --- a/integration-test/gradle.properties +++ b/integration-test/gradle.properties @@ -3,7 +3,7 @@ # mainKotlinVersion=1.6.10 -mainLibVersion=1.3.2-SNAPSHOT +mainLibVersion=1.3.3-SNAPSHOT kotlin.code.style=official kotlin.js.compiler=both