From 2dd133d6ca20a273cc5877f68505a120f817422b Mon Sep 17 00:00:00 2001 From: Travis Wyatt Date: Thu, 21 Nov 2024 22:58:53 -0800 Subject: [PATCH 1/3] Make the peripheral builder argument optional (#795) --- kable-core/api/android/kable-core.api | 2 ++ kable-core/api/jvm/kable-core.api | 1 + kable-core/src/androidMain/kotlin/Peripheral.kt | 2 +- kable-core/src/appleMain/kotlin/Peripheral.kt | 2 +- kable-core/src/commonMain/kotlin/Peripheral.kt | 2 +- kable-core/src/jsMain/kotlin/Peripheral.kt | 2 +- 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/kable-core/api/android/kable-core.api b/kable-core/api/android/kable-core.api index 833cf3ada..d0dd5c394 100644 --- a/kable-core/api/android/kable-core.api +++ b/kable-core/api/android/kable-core.api @@ -350,6 +350,8 @@ public final class com/juul/kable/PeripheralBuilder { public final class com/juul/kable/PeripheralKt { public static final fun Peripheral (Landroid/bluetooth/BluetoothDevice;Lkotlin/jvm/functions/Function1;)Lcom/juul/kable/Peripheral; public static final fun Peripheral (Lcom/juul/kable/Advertisement;Lkotlin/jvm/functions/Function1;)Lcom/juul/kable/Peripheral; + public static synthetic fun Peripheral$default (Landroid/bluetooth/BluetoothDevice;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/juul/kable/Peripheral; + public static synthetic fun Peripheral$default (Lcom/juul/kable/Advertisement;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/juul/kable/Peripheral; } public final class com/juul/kable/Peripheral_deprecatedKt { diff --git a/kable-core/api/jvm/kable-core.api b/kable-core/api/jvm/kable-core.api index d575a5902..556180508 100644 --- a/kable-core/api/jvm/kable-core.api +++ b/kable-core/api/jvm/kable-core.api @@ -258,6 +258,7 @@ public final class com/juul/kable/PeripheralBuilder { public final class com/juul/kable/PeripheralKt { public static final fun Peripheral (Lcom/juul/kable/Advertisement;Lkotlin/jvm/functions/Function1;)Lcom/juul/kable/Peripheral; + public static synthetic fun Peripheral$default (Lcom/juul/kable/Advertisement;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/juul/kable/Peripheral; } public final class com/juul/kable/Peripheral_deprecatedKt { diff --git a/kable-core/src/androidMain/kotlin/Peripheral.kt b/kable-core/src/androidMain/kotlin/Peripheral.kt index 360ff9b64..5b48c3419 100644 --- a/kable-core/src/androidMain/kotlin/Peripheral.kt +++ b/kable-core/src/androidMain/kotlin/Peripheral.kt @@ -12,7 +12,7 @@ public actual fun Peripheral( public fun Peripheral( bluetoothDevice: BluetoothDevice, - builderAction: PeripheralBuilderAction, + builderAction: PeripheralBuilderAction = {}, ): Peripheral { val builder = PeripheralBuilder().apply(builderAction) return BluetoothDeviceAndroidPeripheral( diff --git a/kable-core/src/appleMain/kotlin/Peripheral.kt b/kable-core/src/appleMain/kotlin/Peripheral.kt index 6b21439fa..5965c0074 100644 --- a/kable-core/src/appleMain/kotlin/Peripheral.kt +++ b/kable-core/src/appleMain/kotlin/Peripheral.kt @@ -23,7 +23,7 @@ public fun Peripheral( @Suppress("FunctionName") // Builder function. public fun Peripheral( cbPeripheral: CBPeripheral, - builderAction: PeripheralBuilderAction, + builderAction: PeripheralBuilderAction = {}, ): CoreBluetoothPeripheral { val builder = PeripheralBuilder().apply(builderAction) return CBPeripheralCoreBluetoothPeripheral( diff --git a/kable-core/src/commonMain/kotlin/Peripheral.kt b/kable-core/src/commonMain/kotlin/Peripheral.kt index a6024094b..6bfe4866a 100644 --- a/kable-core/src/commonMain/kotlin/Peripheral.kt +++ b/kable-core/src/commonMain/kotlin/Peripheral.kt @@ -289,7 +289,7 @@ internal typealias PeripheralBuilderAction = PeripheralBuilder.() -> Unit public expect fun Peripheral( advertisement: Advertisement, - builderAction: PeripheralBuilderAction, + builderAction: PeripheralBuilderAction = {}, ): Peripheral /** diff --git a/kable-core/src/jsMain/kotlin/Peripheral.kt b/kable-core/src/jsMain/kotlin/Peripheral.kt index 6725b65c7..58263059b 100644 --- a/kable-core/src/jsMain/kotlin/Peripheral.kt +++ b/kable-core/src/jsMain/kotlin/Peripheral.kt @@ -13,7 +13,7 @@ public actual fun Peripheral( @Suppress("FunctionName") // Builder function. internal fun Peripheral( bluetoothDevice: BluetoothDevice, - builderAction: PeripheralBuilderAction = {}, + builderAction: PeripheralBuilderAction, ): WebBluetoothPeripheral = Peripheral(bluetoothDevice, PeripheralBuilder().apply(builderAction)) @Suppress("FunctionName") // Builder function. From 623ea9e240e578cd08e33836aac570559c09d793 Mon Sep 17 00:00:00 2001 From: JUUL Mobile Bot Date: Mon, 25 Nov 2024 09:57:20 -0800 Subject: [PATCH 2/3] Update dependency com.juul.khronicle:khronicle-core to v0.4.1 (#800) --- 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 d9940366b..b3649830f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,7 +12,7 @@ androidx-core = { module = "androidx.core:core-ktx", version = "1.15.0" } androidx-startup = { module = "androidx.startup:startup-runtime", version = "1.2.0" } atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" } datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version = "0.6.1" } -khronicle = { module = "com.juul.khronicle:khronicle-core", version = "0.3.0" } +khronicle = { module = "com.juul.khronicle:khronicle-core", version = "0.4.1" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } From cabe1374bcda5cc0b72d5934a42706fbe1fe4e17 Mon Sep 17 00:00:00 2001 From: JUUL Mobile Bot Date: Mon, 25 Nov 2024 10:29:27 -0800 Subject: [PATCH 3/3] Update dependency org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom to v1.0.0-pre.835 (#799) --- 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 b3649830f..7a61bf945 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -20,7 +20,7 @@ kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version = "0.5. tuulbox-collections = { module = "com.juul.tuulbox:collections", version.ref = "tuulbox" } tuulbox-coroutines = { module = "com.juul.tuulbox:coroutines", version.ref = "tuulbox" } uuid = { module = "com.benasher44:uuid", version = "0.8.4" } -wrappers-bom = { module = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom", version = "1.0.0-pre.832" } +wrappers-bom = { module = "org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom", version = "1.0.0-pre.835" } wrappers-web = { module = "org.jetbrains.kotlin-wrappers:kotlin-web" } [plugins]