2026-11-06 16:50:22 +08:00
|
|
|
|
/*
|
|
|
|
|
|
* 浩瑞(HaoRui)· app 模块
|
|
|
|
|
|
* 应用 ID:com.haorui.app
|
|
|
|
|
|
*/
|
|
|
|
|
|
plugins {
|
|
|
|
|
|
id("com.android.application")
|
|
|
|
|
|
id("org.jetbrains.kotlin.android")
|
|
|
|
|
|
id("org.jetbrains.kotlin.plugin.compose")
|
|
|
|
|
|
id("org.jetbrains.kotlin.plugin.serialization")
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
android {
|
|
|
|
|
|
namespace = "com.haorui.app"
|
|
|
|
|
|
compileSdk = 35
|
|
|
|
|
|
|
|
|
|
|
|
defaultConfig {
|
|
|
|
|
|
applicationId = "com.haorui.app"
|
|
|
|
|
|
minSdk = 28
|
|
|
|
|
|
targetSdk = 35
|
|
|
|
|
|
versionCode = 1
|
|
|
|
|
|
versionName = "0.1.0"
|
2026-11-14 09:34:26 +08:00
|
|
|
|
testInstrumentationRunner = "com.haorui.app.crossplatform.StoreInstrumentation"
|
2026-11-06 16:50:22 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildTypes {
|
|
|
|
|
|
release {
|
|
|
|
|
|
isMinifyEnabled = false
|
|
|
|
|
|
// 签名配置待阶段 0 收尾补全(keystore 落工程内 .toolchain/keys/)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
compileOptions {
|
|
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
kotlinOptions {
|
|
|
|
|
|
jvmTarget = "17"
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
buildFeatures {
|
|
|
|
|
|
compose = true
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
packaging {
|
|
|
|
|
|
resources {
|
|
|
|
|
|
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
|
implementation(platform("androidx.compose:compose-bom:2024.10.01"))
|
|
|
|
|
|
implementation("androidx.compose.ui:ui")
|
|
|
|
|
|
implementation("androidx.compose.ui:ui-tooling-preview")
|
|
|
|
|
|
implementation("androidx.compose.material3:material3")
|
|
|
|
|
|
implementation("androidx.compose.material:material-icons-extended")
|
|
|
|
|
|
implementation("androidx.activity:activity-compose:1.9.3")
|
|
|
|
|
|
implementation("androidx.core:core-ktx:1.15.0")
|
|
|
|
|
|
|
|
|
|
|
|
// 导航:底部 4 tab + 10 页 + 返回栈
|
|
|
|
|
|
implementation("androidx.navigation:navigation-compose:2.8.4")
|
|
|
|
|
|
// 配置存储:替代原 20 个 SharedPreferences
|
|
|
|
|
|
implementation("androidx.datastore:datastore-preferences:1.1.1")
|
|
|
|
|
|
// ViewModel + 协程
|
|
|
|
|
|
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
|
|
|
|
|
|
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0")
|
|
|
|
|
|
// JSON(配置导入导出)
|
|
|
|
|
|
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3")
|
|
|
|
|
|
// ML Kit 中文文字识别(standalone,不依赖 Google Play Services)
|
|
|
|
|
|
implementation("com.google.mlkit:text-recognition-chinese:16.0.1")
|
|
|
|
|
|
|
|
|
|
|
|
debugImplementation("androidx.compose.ui:ui-tooling")
|
2026-11-14 09:34:26 +08:00
|
|
|
|
implementation("com.google.zxing:core:3.5.3")
|
2026-11-13 15:37:20 +08:00
|
|
|
|
testImplementation("junit:junit:4.13.2")
|
2026-11-14 09:34:26 +08:00
|
|
|
|
androidTestImplementation("junit:junit:4.13.2")
|
2026-11-06 16:50:22 +08:00
|
|
|
|
}
|