Files
abox-mgr/android/app/build.gradle.kts
T
KremeCN 4d4dd2893e feat(scene): complete automation runtime (#11)
## Summary

- persist scenes and trigger state in Room with a database migration and one-time default seeding
- execute enabled automatic scenes from real device readings with edge-triggered thresholds, conditions, hysteresis, and time occurrence deduplication
- schedule foreground polling and WorkManager background evaluation, including reconciliation after scene changes
- allow automatic commands to be run manually for testing while bypassing triggers and conditions
- send real system notifications with runtime permission handling and accurate failure reporting
- move Other Options & Appearance to the bottom of the command editor

## Verification

- ./gradlew.bat :android:app:assembleDebug --no-daemon
- installed and exercised on mulator-5554
- verified manual automatic-command execution and Activity records
- verified notification permission flow, posted notification, and successful Activity records

Automated tests were not run per the requested iteration workflow.

Reviewed-on: #11
Co-authored-by: KremeCN <3265494849@qq.com>
2026-08-28 06:39:31 +08:00

106 lines
3.3 KiB
Kotlin

import org.jetbrains.kotlin.gradle.dsl.JvmTarget
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
alias(libs.plugins.kotlin.kapt)
alias(libs.plugins.hilt.android)
alias(libs.plugins.compose.screenshot)
}
android {
namespace = "com.flagship.abox.manager"
compileSdk = 37
experimentalProperties["android.experimental.enableScreenshotTest"] = true
defaultConfig {
applicationId = "com.flagship.abox.manager"
minSdk = 26
targetSdk = 36
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
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
packaging {
resources {
excludes += "/META-INF/{AL2.0,LGPL2.1}"
excludes += "/META-INF/DEPENDENCIES"
excludes += "/META-INF/LICENSE*"
excludes += "/META-INF/NOTICE*"
excludes += "/META-INF/INDEX.LIST"
}
}
}
kotlin {
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
}
kapt {
correctErrorTypes = true
}
dependencies {
implementation(project(":domain"))
implementation(project(":android:core:designsystem"))
implementation(project(":android:core:preferences"))
implementation(project(":android:core:devicecatalog"))
implementation(project(":android:core:session"))
implementation(project(":android:feature:infrared"))
implementation(project(":android:feature:automation"))
implementation(libs.androidx.hilt.work)
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)
screenshotTestImplementation(libs.compose.screenshot.test)
}