- connect 前清理遗留 gatt,避免实例泄漏 - 等 CCCD descriptor 写入完成再 resume 连接,防止首次 write 卡在 gatt 串行队列 - writeWithoutResponse 失败后重试一次,仍失败抛 WriteFailed,让上层 RPC 快速失败而非等 10 秒超时 - sdk/build.gradle.kts 声明 group/version 以便 QA app composite build 引用 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
31 lines
575 B
Kotlin
31 lines
575 B
Kotlin
plugins {
|
|
id("com.android.library")
|
|
id("org.jetbrains.kotlin.android")
|
|
}
|
|
|
|
group = "com.duooomi"
|
|
version = "0.0.0-local"
|
|
|
|
android {
|
|
namespace = "com.duooomi.ble"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
minSdk = 23
|
|
consumerProguardFiles("consumer-rules.pro")
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_11
|
|
targetCompatibility = JavaVersion.VERSION_11
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "11"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3")
|
|
}
|