From 09cda9642492b9ffe3f915035c407cf82212a9a3 Mon Sep 17 00:00:00 2001 From: JUUL Mobile Bot Date: Fri, 12 Jan 2024 10:16:35 -0800 Subject: [PATCH 1/2] Update plugin maven-publish to v0.27.0 (#238) --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 3968e4ab..bc8b41d6 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -17,4 +17,4 @@ kotlin-js = { id = "org.jetbrains.kotlin.js", version.ref = "kotlin" } kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } kotlinter = { id = "org.jmailen.kotlinter", version = "4.1.1" } kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } -maven-publish = { id = "com.vanniktech.maven.publish", version = "0.26.0" } +maven-publish = { id = "com.vanniktech.maven.publish", version = "0.27.0" } From 63908175d903f22bd21db062b28b8f6f40a76bfc Mon Sep 17 00:00:00 2001 From: Travis Wyatt Date: Tue, 16 Jan 2024 10:27:10 -0800 Subject: [PATCH 2/2] Mark `Registration` sub types as `data object`s (#239) Improves `toString` output, especially on JS, which currently translates to `[object Object]` (rather than `Register` or `Deregister`). --- koap/api/koap.api | 6 ++++++ koap/src/commonMain/kotlin/Message.kt | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/koap/api/koap.api b/koap/api/koap.api index 1bca6a8b..c6865fef 100644 --- a/koap/api/koap.api +++ b/koap/api/koap.api @@ -363,10 +363,16 @@ public abstract class com/juul/koap/Message$Option$Observe$Registration { public final class com/juul/koap/Message$Option$Observe$Registration$Deregister : com/juul/koap/Message$Option$Observe$Registration { public static final field INSTANCE Lcom/juul/koap/Message$Option$Observe$Registration$Deregister; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; } public final class com/juul/koap/Message$Option$Observe$Registration$Register : com/juul/koap/Message$Option$Observe$Registration { public static final field INSTANCE Lcom/juul/koap/Message$Option$Observe$Registration$Register; + public fun equals (Ljava/lang/Object;)Z + public fun hashCode ()I + public fun toString ()Ljava/lang/String; } public final class com/juul/koap/Message$Option$ProxyScheme : com/juul/koap/Message$Option { diff --git a/koap/src/commonMain/kotlin/Message.kt b/koap/src/commonMain/kotlin/Message.kt index 551027b5..41e909fc 100644 --- a/koap/src/commonMain/kotlin/Message.kt +++ b/koap/src/commonMain/kotlin/Message.kt @@ -303,8 +303,8 @@ sealed class Message { * - `1` (deregister) removes the entry from the list, if present. */ sealed class Registration { - object Register : Registration() - object Deregister : Registration() + data object Register : Registration() + data object Deregister : Registration() } /**