- FeatureMount: HOME tab now mounts ProjectWorkspaceFragment; delete placeholder HomeFragment - app/build.gradle.kts + libs.versions.toml: add androidx recyclerview and swiperefreshlayout for project list and pull-to-refresh - NetworkModule: register ProjectApi (M2 2.5.1.1 GetProjectList) via provideProjectApi - SessionRepository: add SessionState.Restoring as initial state so cold start renders neutral loading instead of prompting login - MineFragment/layout: consumer-grade flow with horizontal identity card (whole card acts as login CTA when signed out), config warning card, grouped settings rows; drop back button and manual refresh entry - MineViewModel: remove manual refresh(); session restore is now automatic on cold start - LoginFragment/layout: MaterialToolbar back, segmented MaterialButtonToggleGroup for account/SMS mode, TextInputLayout floating-label inputs, linear progress below button - ConfigFragment/ChangePasswordFragment layouts: unify back navigation to Toolbar, switch plain EditTexts to TextInputLayout, replace ProgressBar with LinearProgressIndicator - strings.xml: add M2 home workbench copy and mine/login labels; remove unused action_back, mine_login, mine_refresh, mine_config_ready, mine_logout_confirm
81 lines
2.3 KiB
Kotlin
81 lines
2.3 KiB
Kotlin
// app 业务壳:导航、主题、权限、配置注入;M1–M6 页面经 FeatureMount 挂载
|
||
plugins {
|
||
alias(libs.plugins.android.application)
|
||
alias(libs.plugins.kotlin.android)
|
||
alias(libs.plugins.ksp)
|
||
alias(libs.plugins.hilt)
|
||
}
|
||
|
||
android {
|
||
namespace = "com.stec.cmd"
|
||
compileSdk = 34
|
||
|
||
defaultConfig {
|
||
applicationId = "com.stec.cmd"
|
||
minSdk = 26
|
||
targetSdk = 34
|
||
versionCode = 1
|
||
versionName = "0.1.0-S0"
|
||
}
|
||
|
||
buildTypes {
|
||
release {
|
||
isMinifyEnabled = true
|
||
isShrinkResources = true
|
||
proguardFiles(
|
||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||
"proguard-rules.pro",
|
||
)
|
||
}
|
||
}
|
||
|
||
buildFeatures {
|
||
viewBinding = true
|
||
}
|
||
|
||
compileOptions {
|
||
sourceCompatibility = JavaVersion.VERSION_17
|
||
targetCompatibility = JavaVersion.VERSION_17
|
||
}
|
||
|
||
kotlinOptions {
|
||
jvmTarget = "17"
|
||
}
|
||
}
|
||
|
||
dependencies {
|
||
// core 基础层 + 协议解析(业务模块只允许经 core 层访问能力)
|
||
implementation(project(":core:common"))
|
||
implementation(project(":core:network"))
|
||
implementation(project(":core:database"))
|
||
implementation(project(":core:ble"))
|
||
implementation(project(":ble-protocol"))
|
||
|
||
implementation(libs.androidx.core.ktx)
|
||
implementation(libs.androidx.appcompat)
|
||
implementation(libs.androidx.activity)
|
||
implementation(libs.androidx.fragment.ktx)
|
||
implementation(libs.androidx.splashscreen)
|
||
implementation(libs.google.material)
|
||
implementation(libs.androidx.recyclerview)
|
||
implementation(libs.androidx.swiperefreshlayout)
|
||
|
||
implementation(libs.androidx.lifecycle.runtime)
|
||
implementation(libs.androidx.lifecycle.viewmodel)
|
||
implementation(libs.androidx.lifecycle.livedata)
|
||
|
||
// 协程(ViewModel launch / StateFlow collect 需要)
|
||
implementation(libs.kotlinx.coroutines.android)
|
||
implementation(libs.kotlinx.coroutines.core)
|
||
|
||
implementation(libs.androidx.datastore.preferences)
|
||
implementation(libs.androidx.security.crypto)
|
||
|
||
implementation(libs.hilt.android)
|
||
ksp(libs.hilt.compiler)
|
||
|
||
testImplementation(libs.junit)
|
||
androidTestImplementation(libs.androidx.junit)
|
||
androidTestImplementation(libs.androidx.espresso.core)
|
||
}
|