diff --git a/.github/workflows/gemini-review.yml b/.github/workflows/gemini-review.yml new file mode 100644 index 0000000..f23da40 --- /dev/null +++ b/.github/workflows/gemini-review.yml @@ -0,0 +1,37 @@ +name: Gemini Code Review + +on: + pull_request: + types: [opened, synchronize] + +jobs: + review: + runs-on: ubuntu-latest + permissions: + pull-requests: write # Allows Gemini to post comments on your PR + contents: read + + steps: + - name: Checkout Code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Gemini PR Reviewer + uses: sshnaidm/gemini-code-review-action@v2 + with: + gemini-key: ${{ secrets.GEMINI_API_KEY }} + model: "gemini-3.5-flash" + # Adding a custom prompt significantly improves quality + prompt: | + You are an expert Senior Mobile Engineer specializing in Compose Multiplatform (CMP) and Kotlin Multiplatform (KMP) architecture across Android and iOS. Review the provided git diff. + + 1. Be critical but constructive. Focus heavily on severe logic bugs, security risks, memory leaks, and performance flaws (such as recomposition loops, missing `remember` blocks, or running blocking work inside Composables). + 2. Understand KMP Source Sets: Ensure that code in `commonMain` is strictly cross-platform. Flag any accidental imports of Android-specific types (like `android.content.Context`, `Toast`, or Java standard libraries) inside common modules. + 3. Idiomatic expect/actual: Verify that `expect`/`actual` patterns are used correctly and placed in the appropriate modules (`commonMain` vs `iosMain`/`androidMain`). Ensure that actual declarations completely satisfy the expected contract. + 4. State & Lifecycle Management: Look out for multiplatform State handling. Ensure state hoisting is clean and multiplatform lifecycle components (like CMP-compatible ViewModels or state storage) follow structured concurrency patterns with Coroutines. + 5. Cross-Platform UI Pitfalls: Look for issues specific to the CMP UI rendering target (such as missing platform-independent Resource handling like `Res`, unoptimized custom canvas drawing, or breaking layouts on iOS). + 6. Do not invent bugs where there are none. If you are unsure about code logic due to missing context or missing file access in the diff, state that clearly instead of guessing or assuming a bug exists. + 7. CRITICAL: Do NOT attempt to verify, check, or critique dependency library or Gradle plugin version numbers. You do not have internet access to verify them; completely ignore version updates unless the syntax is explicitly broken. + 8. Only comment on lines that require fixes or optimizations. If code looks correct, do not leave a comment. + 9. Be highly concise. \ No newline at end of file diff --git a/androidApp/build.gradle.kts b/androidApp/build.gradle.kts new file mode 100644 index 0000000..b4f0cd2 --- /dev/null +++ b/androidApp/build.gradle.kts @@ -0,0 +1,46 @@ +plugins { + alias(libs.plugins.android.application) + alias(libs.plugins.compose.compiler) +} + +android { + namespace = "io.github.developrofthings.helloV1" + compileSdk = libs.versions.compileSDK.get().toInt() + + defaultConfig { + applicationId = "io.github.developrofthings.helloV1" + minSdk = libs.versions.minSDK.get().toInt() + targetSdk = libs.versions.targetSDK.get().toInt() + versionCode = 1 + versionName = "1.0" + } + + buildFeatures { + compose = true + } + + packaging { + resources { + excludes.add("/META-INF/AL2.0") + excludes.add("/META-INF/LGPL2.1") + } + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlin { + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_11) + } + } +} + +dependencies { + implementation(project(":composeApp")) + implementation(libs.androidx.activity.compose) + implementation(libs.core.splashscreen) + implementation(libs.koin.android) +} diff --git a/androidApp/src/main/AndroidManifest.xml b/androidApp/src/main/AndroidManifest.xml new file mode 100644 index 0000000..348368d --- /dev/null +++ b/androidApp/src/main/AndroidManifest.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainActivity.kt b/androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainActivity.kt similarity index 97% rename from composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainActivity.kt rename to androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainActivity.kt index 7d78f80..3ec3f83 100644 --- a/composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainActivity.kt +++ b/androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainActivity.kt @@ -52,4 +52,4 @@ private val lightScrim = Color.argb(0xe6, 0xFF, 0xFF, 0xFF) * The default dark scrim, as defined by androidx and the platform: * https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:activity/activity/src/main/java/androidx/activity/EdgeToEdge.kt;l=40-44;drc=27e7d52e8604a080133e8b842db10c89b4482598 */ -private val darkScrim = Color.argb(0x80, 0x1b, 0x1b, 0x1b) \ No newline at end of file +private val darkScrim = Color.argb(0x80, 0x1b, 0x1b, 0x1b) diff --git a/composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainApplication.kt b/androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainApplication.kt similarity index 99% rename from composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainApplication.kt rename to androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainApplication.kt index 2c83613..a00a126 100644 --- a/composeApp/src/androidMain/kotlin/io/github/developrofthings/helloV1/MainApplication.kt +++ b/androidApp/src/main/kotlin/io/github/developrofthings/helloV1/MainApplication.kt @@ -11,4 +11,4 @@ class MainApplication: Application() { // Make sure the Koin is is initialized initApp(espContext = ESPContext(this)) } -} \ No newline at end of file +} diff --git a/composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml b/androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml similarity index 100% rename from composeApp/src/androidMain/res/mipmap-anydpi-v26/ic_launcher.xml rename to androidApp/src/main/res/mipmap-anydpi-v26/ic_launcher.xml diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-hdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-hdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-mdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-mdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xxhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_background.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_background.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_background.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_foreground.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png diff --git a/composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png b/androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png similarity index 100% rename from composeApp/src/androidMain/res/mipmap-xxxhdpi/ic_launcher_monochrome.png rename to androidApp/src/main/res/mipmap-xxxhdpi/ic_launcher_monochrome.png diff --git a/composeApp/src/androidMain/res/values/colors.xml b/androidApp/src/main/res/values/colors.xml similarity index 100% rename from composeApp/src/androidMain/res/values/colors.xml rename to androidApp/src/main/res/values/colors.xml diff --git a/composeApp/src/androidMain/res/values/strings.xml b/androidApp/src/main/res/values/strings.xml similarity index 100% rename from composeApp/src/androidMain/res/values/strings.xml rename to androidApp/src/main/res/values/strings.xml diff --git a/composeApp/src/androidMain/res/values/themes.xml b/androidApp/src/main/res/values/themes.xml similarity index 100% rename from composeApp/src/androidMain/res/values/themes.xml rename to androidApp/src/main/res/values/themes.xml diff --git a/composeApp/src/androidMain/res/xml/backup_rules.xml b/androidApp/src/main/res/xml/backup_rules.xml similarity index 100% rename from composeApp/src/androidMain/res/xml/backup_rules.xml rename to androidApp/src/main/res/xml/backup_rules.xml diff --git a/composeApp/src/androidMain/res/xml/data_extraction_rules.xml b/androidApp/src/main/res/xml/data_extraction_rules.xml similarity index 100% rename from composeApp/src/androidMain/res/xml/data_extraction_rules.xml rename to androidApp/src/main/res/xml/data_extraction_rules.xml diff --git a/build.gradle.kts b/build.gradle.kts index 7f45585..0cf00b9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,7 +1,6 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. plugins { alias(libs.plugins.android.application) apply false - alias(libs.plugins.jetbrains.kotlin.android) apply false alias(libs.plugins.compose.compiler) apply false alias(libs.plugins.android.library) apply false alias(libs.plugins.protobuf) apply false @@ -85,4 +84,3 @@ fun Project.configurePublishing( } } } - diff --git a/callbacks/build.gradle.kts b/callbacks/build.gradle.kts index cac4988..dc649a7 100644 --- a/callbacks/build.gradle.kts +++ b/callbacks/build.gradle.kts @@ -22,13 +22,13 @@ kotlin { // Target declarations - add or remove as needed below. These define // which platforms this KMP module supports. // See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets - androidLibrary { + android { namespace = "io.github.developrofthings.kespl.callbacks" compileSdk = 36 minSdk = 24 // Configure test that will run on JVM ie "unit test" - withHostTestBuilder {} + withHostTest {} compilerOptions { jvmTarget.set(JvmTarget.JVM_11) @@ -37,7 +37,6 @@ kotlin { val xcf = XCFramework(xcFrameworkName = xcfName) listOf( - iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 48b5136..04bf517 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -2,7 +2,7 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget plugins { alias(libs.plugins.kotlin.multiplatform) - alias(libs.plugins.android.application) + alias(libs.plugins.android.kotlin.multiplatform.library) alias(libs.plugins.compose.multiplatform) alias(libs.plugins.compose.compiler) alias(libs.plugins.kotlin.serialization) @@ -17,7 +17,15 @@ skie { } kotlin { - androidTarget { + android { + namespace = "io.github.developrofthings.helloV1.shared" + compileSdk = libs.versions.compileSDK.get().toInt() + minSdk = libs.versions.minSDK.get().toInt() + + androidResources { + enable = true + } + compilerOptions { jvmTarget.set(JvmTarget.JVM_11) } @@ -25,7 +33,6 @@ kotlin { val xcfName = "ComposeAppKit" listOf( - iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> @@ -39,15 +46,12 @@ kotlin { } sourceSets { - androidMain.dependencies { - implementation(libs.androidx.activity.compose) - implementation(libs.core.splashscreen) - } commonMain.dependencies { implementation(libs.compose.runtime) implementation(libs.compose.foundation) implementation(libs.compose.material3) implementation(libs.compose.ui) + implementation(libs.ui.tooling.preview) implementation(libs.compose.component.resources) implementation(compose.components.uiToolingPreview) implementation(libs.androidx.lifecycle.viewmodelCompose) @@ -92,33 +96,6 @@ tasks.matching { it.name.startsWith("ksp") && it.name != "kspCommonMainKotlinMet dependsOn("kspCommonMainKotlinMetadata") } -android { - namespace = "io.github.developrofthings.helloV1" - compileSdk = libs.versions.compileSDK.get().toInt() - - defaultConfig { - namespace = "io.github.developrofthings.helloV1" - minSdk = libs.versions.minSDK.get().toInt() - targetSdk = libs.versions.targetSDK.get().toInt() - versionCode = 1 - versionName = "1.0" - } - packaging { - resources { - excludes += "/META-INF/{AL2.0,LGPL2.1}" - } - } - buildTypes { - getByName("release") { - isMinifyEnabled = false - } - } - compileOptions { - sourceCompatibility = JavaVersion.VERSION_11 - targetCompatibility = JavaVersion.VERSION_11 - } -} - tasks.withType { useJUnitPlatform() } \ No newline at end of file diff --git a/composeApp/src/androidMain/AndroidManifest.xml b/composeApp/src/androidMain/AndroidManifest.xml index 615639d..de749ac 100644 --- a/composeApp/src/androidMain/AndroidManifest.xml +++ b/composeApp/src/androidMain/AndroidManifest.xml @@ -1,47 +1,2 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/Unsupported.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/Unsupported.kt index e1726f5..c9c2a7d 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/Unsupported.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/Unsupported.kt @@ -24,7 +24,7 @@ import hellov1.composeapp.generated.resources.ic_block import hellov1.composeapp.generated.resources.ic_bluetooth import kotlinx.serialization.Serializable import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Serializable data object Unsupported diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Arrow.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Arrow.kt index e28c814..e93919a 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Arrow.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Arrow.kt @@ -15,7 +15,7 @@ import androidx.compose.ui.unit.Constraints import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import io.github.developrofthings.kespl.packet.data.displayData.BandArrowIndicator -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun Arrow( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BandsIndicator.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BandsIndicator.kt index 8034078..f943620 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BandsIndicator.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BandsIndicator.kt @@ -24,7 +24,7 @@ import hellov1.composeapp.generated.resources.ku_band import hellov1.composeapp.generated.resources.laser_abrv import hellov1.composeapp.generated.resources.x_band import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview enum class Bands { Laser, diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Bar.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Bar.kt index 83401d5..275faa2 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Bar.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/Bar.kt @@ -12,7 +12,7 @@ import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview val unlitBarColor: Color = Color(0xFF2F0000) val litBarColor: Color = Color(0xFFCB0000) diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BarGraph.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BarGraph.kt index c30e977..c320302 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BarGraph.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/BarGraph.kt @@ -19,7 +19,7 @@ import io.github.developrofthings.kespl.packet.data.displayData.SignalStrengthBa import hellov1.composeapp.generated.resources.Res import hellov1.composeapp.generated.resources.strength import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun BarGraph( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/ESPCommandPanel.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/ESPCommandPanel.kt index d902ec1..247cf00 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/ESPCommandPanel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/ESPCommandPanel.kt @@ -38,7 +38,7 @@ import hellov1.composeapp.generated.resources.valentine_1 import hellov1.composeapp.generated.resources.volume_controls import org.jetbrains.compose.resources.stringArrayResource import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun ESPCommandPanel( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SAVVYPanel.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SAVVYPanel.kt index b681740..6cbc8ee 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SAVVYPanel.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SAVVYPanel.kt @@ -30,7 +30,7 @@ import hellov1.composeapp.generated.resources.override_thumbwheel import hellov1.composeapp.generated.resources.request_savvy_status import hellov1.composeapp.generated.resources.savvy import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun SAVVYPanel( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SevenSegment.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SevenSegment.kt index 5e35184..e0c635c 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SevenSegment.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SevenSegment.kt @@ -14,7 +14,7 @@ import androidx.compose.ui.graphics.drawscope.DrawScope import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp import io.github.developrofthings.kespl.utilities.extensions.primitive.get -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun SevenSegment( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepDefinitionsColumn.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepDefinitionsColumn.kt index e746b94..b1dee77 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepDefinitionsColumn.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepDefinitionsColumn.kt @@ -29,7 +29,7 @@ import hellov1.composeapp.generated.resources.upper import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun rememberSweepDefinitionColumnState( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepSectionsColumn.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepSectionsColumn.kt index d5f8cc2..2acad15 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepSectionsColumn.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/SweepSectionsColumn.kt @@ -32,7 +32,7 @@ import hellov1.composeapp.generated.resources.upper import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import kotlin.experimental.or @Composable diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserByte.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserByte.kt index 777d296..c4b3eb4 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserByte.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserByte.kt @@ -38,7 +38,7 @@ import hellov1.composeapp.generated.resources.user_byte_undefined import hellov1.composeapp.generated.resources.write_to_v1 import org.jetbrains.compose.resources.stringArrayResource import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun rememberUserByteState( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesPager.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesPager.kt index f7d65e0..149bfb7 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesPager.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesPager.kt @@ -18,7 +18,7 @@ import androidx.compose.ui.unit.dp import io.github.developrofthings.helloV1.ui.theme.Valentine1Theme import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.combine -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun rememberUserBytesPagerState( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesRow.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesRow.kt index c4971fa..0b161e1 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesRow.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/UserBytesRow.kt @@ -46,7 +46,7 @@ import io.github.developrofthings.helloV1.ui.theme.Valentine1Theme import io.github.developrofthings.kespl.utilities.V1VersionInfo import kotlinx.coroutines.flow.Flow import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Composable fun rememberUserBytesState( diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cAppBar.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cAppBar.kt index d7f6476..217a9d9 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cAppBar.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cAppBar.kt @@ -33,7 +33,7 @@ import hellov1.composeapp.generated.resources.scan_for_v1c import hellov1.composeapp.generated.resources.scan_for_v1connection_s import org.jetbrains.compose.resources.stringResource import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview private val amberColor = Color(0xFFFFBF00) private fun ESPConnectionStatus.toColor() = when (this) { diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cScanItem.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cScanItem.kt index 07d9abc..8ea0696 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cScanItem.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/component/V1cScanItem.kt @@ -24,7 +24,7 @@ import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp import io.github.developrofthings.kespl.bluetooth.V1connectionScanResult -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import kotlin.math.abs @Composable diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/dialog/sweep/SweepInfoDialog.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/dialog/sweep/SweepInfoDialog.kt index ec4460a..79f2d7b 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/dialog/sweep/SweepInfoDialog.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/dialog/sweep/SweepInfoDialog.kt @@ -48,7 +48,7 @@ import hellov1.composeapp.generated.resources.sweep_sections import hellov1.composeapp.generated.resources.write import kotlinx.coroutines.CoroutineScope import org.jetbrains.compose.resources.stringResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.koinInject import org.koin.core.parameter.parametersOf diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/display/InfDisplayScreen.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/display/InfDisplayScreen.kt index 4f4e308..caf42fc 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/display/InfDisplayScreen.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/display/InfDisplayScreen.kt @@ -44,7 +44,7 @@ import hellov1.composeapp.generated.resources.ic_bluetooth import hellov1.composeapp.generated.resources.ic_mute import kotlinx.serialization.Serializable import org.jetbrains.compose.resources.vectorResource -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview import org.koin.compose.viewmodel.koinViewModel @Serializable diff --git a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/main/MainScreen.kt b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/main/MainScreen.kt index 9042b6e..e5db676 100644 --- a/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/main/MainScreen.kt +++ b/composeApp/src/commonMain/kotlin/io/github/developrofthings/helloV1/ui/main/MainScreen.kt @@ -43,7 +43,7 @@ import io.github.developrofthings.helloV1.ui.log.ESPLogScreen import io.github.developrofthings.kespl.bluetooth.V1cType import kotlinx.coroutines.launch import kotlinx.serialization.Serializable -import org.jetbrains.compose.ui.tooling.preview.Preview +import androidx.compose.ui.tooling.preview.Preview @Serializable data object Main diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 411fe89..e55fca2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,39 +1,39 @@ [versions] -kespl = "0.9.6" -constraintlayoutComposeMultiplatform = "0.6.1" -datastoreCoreOkio = "1.2.0" -kotlinxCoroutinesCore = "1.10.2" -kotlinxIoCore = "0.8.2" -kotlinxSerializationProto = "1.9.0" +kespl = "0.9.7" +constraintlayoutComposeMultiplatform = "0.7.0" +datastoreCoreOkio = "1.2.1" +kotlinxCoroutinesCore = "1.11.0" +kotlinxIoCore = "0.9.0" +kotlinxSerializationProto = "1.11.0" minSDK = "26" -compileSDK = "36" +compileSDK = "37" mokoPermissions = "0.20.1" -targetSDK = "36" -androidGradlePlugin = "8.13.2" -arrow = "2.2.0" -kotlin = "2.2.21" -kotlinxCoroutinesTest = "1.10.2" +targetSDK = "37" +androidGradlePlugin = "9.2.1" +arrow = "2.2.2.1" +kotlin = "2.3.21" +kotlinxCoroutinesTest = "1.11.0" junit = "4.13.2" -activityCompose = "1.12.2" -mockk = "1.14.7" -protobufPlugin = "0.9.6" -atomicfu = "0.29.0" -koin-bom = "4.1.1" -koin = "4.1.1" -ksp = "2.2.20-2.0.3" -koin-annotations = "2.3.1" +activityCompose = "1.13.0" +mockk = "1.14.11" +protobufPlugin = "0.10.0" +atomicfu = "0.33.0" +koin-bom = "4.2.1" +koin = "4.2.1" +ksp = "2.3.7" +koin-annotations = "4.2.1" turbine = "1.2.1" -kotlinxSerializationJson = "1.9.0" -annotationJvm = "1.9.1" -coreVersion = "1.17.0" -composeMultiplatform = "1.10.0" +kotlinxSerializationJson = "1.11.0" +annotationJvm = "1.10.0" +coreVersion = "1.18.0" +composeMultiplatform = "1.11.0" composeMaterial3 = "1.9.0" -androidx-lifecycle = "2.9.6" +androidx-lifecycle = "2.10.0" adaptive = "1.2.0" -vanniktechMavenPublish = "0.35.0" +vanniktechMavenPublish = "0.36.0" coreSplashScreen = "1.2.0" -devMokkery = "3.0.0" -skie = "0.10.9" +devMokkery = "3.3.0" +skie = "0.10.12" [libraries] androidx-lifecycle-viewmodelCompose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } @@ -49,6 +49,7 @@ koin-compose = { module = "io.insert-koin:koin-compose", version.ref = "koin-bom koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin-bom" } koin-compose-viewmodel-navigation = { module = "io.insert-koin:koin-compose-viewmodel-navigation", version.ref = "koin-bom" } koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" } +koin-android = { module = "io.insert-koin:koin-android", version.ref = "koin" } koin-annotations = { module = "io.insert-koin:koin-annotations", version.ref = "koin-annotations" } koin-ksp-compiler = { module = "io.insert-koin:koin-ksp-compiler", version.ref = "koin-annotations" } androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" } @@ -76,6 +77,7 @@ compose-foundation = { module = "org.jetbrains.compose.foundation:foundation", v compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "composeMaterial3" } compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "composeMultiplatform" } compose-component-resources = { module = "org.jetbrains.compose.components:components-resources", version.ref = "composeMultiplatform" } +ui-tooling-preview = { module = "org.jetbrains.compose.ui:ui-tooling-preview", version.ref = "composeMultiplatform" } [plugins] mokkery = { id = "dev.mokkery", version.ref = "devMokkery" } @@ -83,7 +85,6 @@ skie = { id = "co.touchlab.skie", version.ref = "skie" } ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } protobuf = { id = "com.google.protobuf", version.ref = "protobufPlugin" } android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } -jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" } compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d4081da..915ad71 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ +#Thu May 21 14:05:19 EDT 2026 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/library/build.gradle.kts b/library/build.gradle.kts index 8ff5c44..43441e1 100644 --- a/library/build.gradle.kts +++ b/library/build.gradle.kts @@ -29,18 +29,16 @@ kotlin { // Target declarations - add or remove as needed below. These define // which platforms this KMP module supports. // See: https://kotlinlang.org/docs/multiplatform-discover-project.html#targets - androidLibrary { + android { namespace = "io.github.developrofthings.kespl" compileSdk = libs.versions.compileSDK.get().toInt() minSdk = libs.versions.minSDK.get().toInt() // Configure test that will run on JVM ie "unit test" - withHostTestBuilder { + withHostTest { } - withDeviceTestBuilder { - sourceSetTreeName = "test" - }.configure { + withDeviceTest { instrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } @@ -55,7 +53,6 @@ kotlin { val xcf = XCFramework(xcFrameworkName = xcfName) listOf( - iosX64(), iosArm64(), iosSimulatorArm64() ).forEach { iosTarget -> @@ -160,7 +157,6 @@ tasks.named("assemble${xcfName}XCFramework") { dependencies { add("kspCommonMainMetadata", libs.koin.ksp.compiler) add("kspAndroid", libs.koin.ksp.compiler) - add("kspIosX64", libs.koin.ksp.compiler) add("kspIosArm64", libs.koin.ksp.compiler) add("kspIosSimulatorArm64", libs.koin.ksp.compiler) } diff --git a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/Util.kt b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/Util.kt index 21073d3..cee927e 100644 --- a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/Util.kt +++ b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/Util.kt @@ -1,11 +1,10 @@ @file:OptIn(ExperimentalUuidApi::class) -import io.github.developrofthings.kespl.bluetooth.EspUUID +package io.github.developrofthings.kespl.bluetooth + import kotlinx.cinterop.BetaInteropApi import kotlinx.cinterop.ExperimentalForeignApi import kotlinx.cinterop.addressOf -import kotlinx.cinterop.allocArrayOf -import kotlinx.cinterop.memScoped import kotlinx.cinterop.usePinned import platform.CoreBluetooth.CBUUID import platform.CoreBluetooth.CBUUID.Companion.UUIDWithString @@ -13,7 +12,6 @@ import platform.Foundation.NSData import platform.Foundation.NSUUID import platform.Foundation.create import platform.posix.memcpy -import toCBUUID import kotlin.uuid.ExperimentalUuidApi import kotlin.uuid.Uuid @@ -50,9 +48,10 @@ fun NSData.toByteArray(): ByteArray = ByteArray(length.toInt()).apply { @OptIn(ExperimentalForeignApi::class, BetaInteropApi::class) fun ByteArray.toNSData(): NSData { - return memScoped { + if (isEmpty()) return NSData() + return usePinned { pinned -> NSData.create( - bytes = allocArrayOf(this@toNSData), + bytes = pinned.addressOf(0), length = this@toNSData.size.toULong() ) } diff --git a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/ESPCoreBluetoothPeripheralDelegate.kt b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/ESPCoreBluetoothPeripheralDelegate.kt index ed2c777..08c0cdc 100644 --- a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/ESPCoreBluetoothPeripheralDelegate.kt +++ b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/ESPCoreBluetoothPeripheralDelegate.kt @@ -1,5 +1,6 @@ package io.github.developrofthings.kespl.bluetooth.connection.le +import io.github.developrofthings.kespl.bluetooth.toByteArray import kotlinx.cinterop.ObjCSignatureOverride import kotlinx.coroutines.channels.BufferOverflow import kotlinx.coroutines.flow.MutableSharedFlow @@ -12,7 +13,6 @@ import platform.CoreBluetooth.CBService import platform.Foundation.NSError import platform.Foundation.NSNumber import platform.darwin.NSObject -import toByteArray internal class ESPCoreBluetoothPeripheralDelegate : NSObject(), CBPeripheralDelegateProtocol { diff --git a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/IOSLeCharacteristicWrapper.kt b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/IOSLeCharacteristicWrapper.kt index cff11a8..cab440b 100644 --- a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/IOSLeCharacteristicWrapper.kt +++ b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/IOSLeCharacteristicWrapper.kt @@ -4,9 +4,7 @@ package io.github.developrofthings.kespl.bluetooth.connection.le import io.github.developrofthings.kespl.packet.toHexString import io.github.developrofthings.kespl.utilities.PlatformLogger -import io.github.developrofthings.kespl.bluetooth.connection.le.filterForCharacteristic -import io.github.developrofthings.kespl.bluetooth.connection.le.filterForCharacteristicWriteResponse -import io.github.developrofthings.kespl.bluetooth.connection.le.isConnectionInterrupted +import io.github.developrofthings.kespl.bluetooth.toNSData import kotlinx.coroutines.FlowPreview import kotlinx.coroutines.TimeoutCancellationException import kotlinx.coroutines.flow.Flow @@ -24,7 +22,6 @@ import kotlinx.coroutines.sync.withLock import platform.CoreBluetooth.CBCharacteristic import platform.CoreBluetooth.CBCharacteristicWriteWithoutResponse import platform.CoreBluetooth.CBPeripheral -import toNSData import kotlin.time.Duration import kotlin.time.Duration.Companion.milliseconds import kotlin.uuid.ExperimentalUuidApi diff --git a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/PlatformLeClient.ios.kt b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/PlatformLeClient.ios.kt index d52524c..339cd1b 100644 --- a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/PlatformLeClient.ios.kt +++ b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/connection/le/PlatformLeClient.ios.kt @@ -1,16 +1,14 @@ package io.github.developrofthings.kespl.bluetooth.connection.le -import CLIENT_OUT_V1_IN_SHORT_CHARACTERISTIC_CBUUID -import V1CONNECTION_LE_SERVICE_CBUUID -import V1_OUT_CLIENT_IN_SHORT_CHARACTERISTIC_CBUUID +import io.github.developrofthings.kespl.bluetooth.CLIENT_OUT_V1_IN_SHORT_CHARACTERISTIC_CBUUID import io.github.developrofthings.kespl.bluetooth.ESPConnectionStatus import io.github.developrofthings.kespl.bluetooth.EspUUID import io.github.developrofthings.kespl.bluetooth.IBluetoothManager import io.github.developrofthings.kespl.bluetooth.IOSBluetoothManager +import io.github.developrofthings.kespl.bluetooth.V1CONNECTION_LE_SERVICE_CBUUID +import io.github.developrofthings.kespl.bluetooth.V1_OUT_CLIENT_IN_SHORT_CHARACTERISTIC_CBUUID import io.github.developrofthings.kespl.bluetooth.V1connection import io.github.developrofthings.kespl.utilities.PlatformLogger -import io.github.developrofthings.kespl.bluetooth.connection.le.filterForPeripheral -import io.github.developrofthings.kespl.bluetooth.connection.le.getV1connectionLeService import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob diff --git a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/discovery/le/IOSLEV1cScanner.kt b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/discovery/le/IOSLEV1cScanner.kt index 19836d8..583538f 100644 --- a/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/discovery/le/IOSLEV1cScanner.kt +++ b/library/src/iosMain/kotlin/io/github/developrofthings/kespl/bluetooth/discovery/le/IOSLEV1cScanner.kt @@ -1,9 +1,9 @@ package io.github.developrofthings.kespl.bluetooth.discovery.le -import V1CONNECTION_LE_SERVICE_CBUUID import io.github.developrofthings.kespl.bluetooth.BTDevice import io.github.developrofthings.kespl.bluetooth.EspUUID import io.github.developrofthings.kespl.bluetooth.IOSBluetoothManager +import io.github.developrofthings.kespl.bluetooth.V1CONNECTION_LE_SERVICE_CBUUID import io.github.developrofthings.kespl.bluetooth.V1cType import io.github.developrofthings.kespl.bluetooth.V1connection import io.github.developrofthings.kespl.bluetooth.V1connectionScanResult diff --git a/settings.gradle.kts b/settings.gradle.kts index a764967..da6c806 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,6 +31,7 @@ dependencyResolutionManagement { } include(":composeApp") +include(":androidApp") include(":library") include(":callbacks")