From 514c42d5755df4bdebb479ecafb7112ad06d570d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 28 Aug 2024 20:31:25 +0000 Subject: [PATCH] Bump serialization from 1.7.1 to 1.7.2 (#390) * Bump serialization from 1.7.1 to 1.7.2 Bumps `serialization` from 1.7.1 to 1.7.2. Updates `org.jetbrains.kotlinx:kotlinx-serialization-core` from 1.7.1 to 1.7.2 - [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases) - [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.7.1...v1.7.2) Updates `org.jetbrains.kotlinx:kotlinx-serialization-json` from 1.7.1 to 1.7.2 - [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases) - [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.7.1...v1.7.2) Updates `org.jetbrains.kotlinx:kotlinx-serialization-cbor` from 1.7.1 to 1.7.2 - [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases) - [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.7.1...v1.7.2) Updates `org.jetbrains.kotlinx:kotlinx-serialization-protobuf` from 1.7.1 to 1.7.2 - [Release notes](https://github.com/Kotlin/kotlinx.serialization/releases) - [Changelog](https://github.com/Kotlin/kotlinx.serialization/blob/master/CHANGELOG.md) - [Commits](https://github.com/Kotlin/kotlinx.serialization/compare/v1.7.1...v1.7.2) --- updated-dependencies: - dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-core dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-json dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-cbor dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.jetbrains.kotlinx:kotlinx-serialization-protobuf dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Remove basic UuidSerializer --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: hfhbd <22521688+hfhbd@users.noreply.github.com> --- gradle/libs.versions.toml | 2 +- .../api/android/kotlinx-uuid-core.api | 12 --------- .../api/jvm/kotlinx-uuid-core.api | 12 --------- .../app/softwork/uuid/UuidSerializer.kt | 25 ------------------- .../softwork/uuid/UuidSerializationTest.kt | 23 ----------------- 5 files changed, 1 insertion(+), 73 deletions(-) delete mode 100644 kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/UuidSerializer.kt delete mode 100644 kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidSerializationTest.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3d64eb0..7114514 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin = "2.0.20-RC2" -serialization = "1.7.1" +serialization = "1.7.2" [libraries] serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" } diff --git a/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api b/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api index af7b88b..f058655 100644 --- a/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api +++ b/kotlinx-uuid-core/api/android/kotlinx-uuid-core.api @@ -48,18 +48,6 @@ public final class app/softwork/uuid/UuidParceler : kotlinx/parcelize/Parceler { public fun write (Lkotlin/uuid/Uuid;Landroid/os/Parcel;I)V } -public final class app/softwork/uuid/UuidSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lapp/softwork/uuid/UuidSerializer; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lkotlin/uuid/Uuid; - public fun equals (Ljava/lang/Object;)Z - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun hashCode ()I - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/uuid/Uuid;)V - public fun toString ()Ljava/lang/String; -} - public final class app/softwork/uuid/Uuidv7Kt { public static final fun Uuidv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J diff --git a/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api b/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api index 3f32688..9719e1a 100644 --- a/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api +++ b/kotlinx-uuid-core/api/jvm/kotlinx-uuid-core.api @@ -35,18 +35,6 @@ public final class app/softwork/uuid/UuidKt { public static final fun toUuidOrNull (Ljava/lang/String;)Lkotlin/uuid/Uuid; } -public final class app/softwork/uuid/UuidSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lapp/softwork/uuid/UuidSerializer; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lkotlin/uuid/Uuid; - public fun equals (Ljava/lang/Object;)Z - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun hashCode ()I - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lkotlin/uuid/Uuid;)V - public fun toString ()Ljava/lang/String; -} - public final class app/softwork/uuid/Uuidv7Kt { public static final fun Uuidv7 (JLkotlin/random/Random;)Lkotlin/uuid/Uuid; public static final fun getUnixTimeStamp (Lkotlin/uuid/Uuid;)J diff --git a/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/UuidSerializer.kt b/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/UuidSerializer.kt deleted file mode 100644 index da83507..0000000 --- a/kotlinx-uuid-core/src/commonMain/kotlin/app/softwork/uuid/UuidSerializer.kt +++ /dev/null @@ -1,25 +0,0 @@ -package app.softwork.uuid - -import kotlinx.serialization.KSerializer -import kotlinx.serialization.descriptors.PrimitiveKind -import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor -import kotlinx.serialization.descriptors.SerialDescriptor -import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder -import kotlin.uuid.Uuid - -/** - * This is the default [Uuid] serializer that encodes instances as primitive strings - * consisting of the canonical UUID string format. - */ -public data object UuidSerializer : KSerializer { - override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor("kotlin.uuid.Uuid", PrimitiveKind.STRING) - - override fun serialize(encoder: Encoder, value: Uuid) { - encoder.encodeString(value.toString()) - } - - override fun deserialize(decoder: Decoder): Uuid { - return Uuid.parse(decoder.decodeString()) - } -} diff --git a/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidSerializationTest.kt b/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidSerializationTest.kt deleted file mode 100644 index 88acae8..0000000 --- a/kotlinx-uuid-core/src/commonTest/kotlin/app/softwork/uuid/UuidSerializationTest.kt +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright 2020-2020 JetBrains s.r.o and contributors. Use of this source code is governed by the Apache 2.0 license. - */ - -package app.softwork.uuid - -import kotlinx.serialization.* -import kotlinx.serialization.json.* -import kotlin.test.* -import kotlin.uuid.Uuid - -@ExperimentalSerializationApi -class UuidSerializationTest { - @Test - fun smokeTest() { - val value = Uuid.parse(SOME_UUID_STRING) - val encoded = Json.encodeToString(UuidSerializer, value) - assertEquals("\"$SOME_UUID_STRING\"", encoded) - val decoded = Json.decodeFromString(UuidSerializer, encoded) - - assertEquals(value, decoded) - } -}