diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index bfba43ae0..2eea5640d 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -12,14 +12,14 @@ 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" } kotlinx-io = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version = "0.5.4" } tuulbox-collections = { module = "com.juul.tuulbox:collections", version.ref = "tuulbox" } tuulbox-coroutines = { module = "com.juul.tuulbox:coroutines", version.ref = "tuulbox" } -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] diff --git a/kable-core/api/android/kable-core.api b/kable-core/api/android/kable-core.api index e0550ca9e..9fc2ecb46 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 b32dbcc9b..b0cd45197 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 cb536c42a..26c961d79 100644 --- a/kable-core/src/commonMain/kotlin/Peripheral.kt +++ b/kable-core/src/commonMain/kotlin/Peripheral.kt @@ -288,7 +288,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.