### 概述 / Summary 完整实现红外控制与学习模块(`:android:feature:infrared`),支持红外设备按键学习、实体发射、Room 本地持久化,以及空调 (AC) / 电视 (TV) 虚拟遥控器面板。 ### 核心变更 / Key Changes 1. **领域模型与用例 (`:domain`)**: - 实现按键学习流程:`LearnInfraredKey`、`ManageInfraredKey`、`InfraredKeyFactory`; - 增加虚拟遥控器模型与用例:`CreateVirtualRemote`、`LearnVirtualRemoteKey`、`SendVirtualRemoteAction`、`AcCodeGenerator` 与预置码库 `PresetCodeLibrary`。 2. **数据持久化与仓储 (`:android:feature:infrared`)**: - 引入 Room 数据库 `InfraredDatabase` 及 DAO,提供 `RoomInfraredKeyRepository` 与 `RoomVirtualRemoteRepository`; - 支持多配置隔离(`ProviderProfileId`)、按键状态管理(`LEARNING` / `READY` / `FAILED`)。 3. **UI 与 ViewModel (`:android:feature:infrared`)**: - `InfraredControlScreen`:红外学习与按键调试列表; - `RemotePanelScreen` / `AcRemotePanel` / `TvRemotePanel`:空调/电视专属可视化遥控面板; - `InfraredHubScreen`:红外中枢与多遥控器管理入口; - 在认证后导航栈中将 `DeviceListScreen` 的红外入口无缝对接到 `InfraredHubRoute`。 4. **测试与文档**: - 补齐用例、Fakes、Repository、ViewModel 以及 Compose UI 自动化测试; - 补充红外控制设计规范与真机硬件验收清单。 Reviewed-on: #9 Co-authored-by: mxhsnd <2049295946@qq.com> Co-authored-by: KremeCN <3265494849@qq.com>
98 lines
2.9 KiB
Kotlin
98 lines
2.9 KiB
Kotlin
plugins {
|
|
alias(libs.plugins.android.application)
|
|
alias(libs.plugins.kotlin.android)
|
|
alias(libs.plugins.kotlin.kapt)
|
|
alias(libs.plugins.hilt.android)
|
|
}
|
|
|
|
android {
|
|
namespace = "com.flagship.abox.manager"
|
|
compileSdk = 34
|
|
|
|
defaultConfig {
|
|
applicationId = "com.flagship.abox.manager"
|
|
minSdk = 26
|
|
targetSdk = 34
|
|
versionCode = 1
|
|
versionName = "0.1.0"
|
|
|
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
|
}
|
|
|
|
buildTypes {
|
|
release {
|
|
isMinifyEnabled = false
|
|
proguardFiles(
|
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
|
"proguard-rules.pro",
|
|
)
|
|
}
|
|
}
|
|
|
|
buildFeatures {
|
|
compose = true
|
|
}
|
|
|
|
composeOptions {
|
|
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
|
|
}
|
|
|
|
compileOptions {
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
}
|
|
|
|
kotlinOptions {
|
|
jvmTarget = "17"
|
|
}
|
|
|
|
packaging {
|
|
resources {
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
excludes += "/META-INF/DEPENDENCIES"
|
|
excludes += "/META-INF/LICENSE*"
|
|
excludes += "/META-INF/NOTICE*"
|
|
}
|
|
}
|
|
}
|
|
|
|
kapt {
|
|
correctErrorTypes = true
|
|
}
|
|
|
|
dependencies {
|
|
implementation(project(":domain"))
|
|
implementation(project(":android:core:designsystem"))
|
|
implementation(project(":android:core:session"))
|
|
implementation(project(":android:feature:infrared"))
|
|
implementation(project(":absdk-bridge"))
|
|
implementation(project(":runtime:simulation"))
|
|
debugImplementation(project(":testing:fakes"))
|
|
|
|
implementation(platform(libs.compose.bom))
|
|
implementation(libs.androidx.activity.compose)
|
|
implementation(libs.androidx.lifecycle.runtime.compose)
|
|
implementation(libs.androidx.lifecycle.viewmodel.ktx)
|
|
implementation(libs.androidx.lifecycle.viewmodel.compose)
|
|
implementation(libs.androidx.navigation.compose)
|
|
implementation(libs.datastore.preferences)
|
|
implementation(libs.androidx.hilt.navigation.compose)
|
|
implementation(libs.compose.ui)
|
|
implementation(libs.compose.ui.tooling.preview)
|
|
implementation(libs.compose.material3)
|
|
implementation(libs.compose.material.icons.extended)
|
|
implementation(libs.hilt.android)
|
|
kapt(libs.hilt.compiler)
|
|
|
|
testImplementation(libs.junit)
|
|
testImplementation(libs.kotlinx.coroutines.test)
|
|
testImplementation(project(":testing:fakes"))
|
|
androidTestImplementation(platform(libs.compose.bom))
|
|
androidTestImplementation(libs.androidx.junit)
|
|
androidTestImplementation(libs.androidx.test.runner)
|
|
androidTestImplementation(libs.espresso.core)
|
|
androidTestImplementation(libs.compose.ui.test.junit4)
|
|
debugImplementation(libs.compose.ui.tooling)
|
|
debugImplementation(libs.compose.ui.test.manifest)
|
|
}
|