refactor: 优化 Android 配置与界面
- 更新 AppConfig、build.gradle.kts - 优化 AboutScreen、ConversationListScreen、NicknameSetupScreen、AuthViewModel - 更新 strings 资源,移除 ic_launcher_foreground.webp Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -59,20 +59,27 @@ android {
|
||||
}
|
||||
|
||||
// 构建类型配置
|
||||
// ⚠️ 只需修改 IS_DEBUG_MODE 即可切换环境
|
||||
// true = 开发模式(显示调试UI,连接开发服务器)
|
||||
// false = 生产模式(隐藏调试UI,连接生产服务器)
|
||||
// URL 地址在 AppConfig.kt 中根据此值自动选择
|
||||
// IS_DEBUG_MODE = 是否显示调试 UI(ErrorDebugPanel、测试通道等)
|
||||
// USE_PROD_SERVER = 是否连接生产环境 API(lifecho.worldsplats.com)
|
||||
buildTypes {
|
||||
// 默认调试即连公网(https://lifecho.worldsplats.com),便于公网调试
|
||||
debug {
|
||||
buildConfigField("Boolean", "IS_DEBUG_MODE", "true") // 开发模式
|
||||
buildConfigField("Boolean", "IS_DEBUG_MODE", "true")
|
||||
buildConfigField("Boolean", "USE_PROD_SERVER", "true")
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debug"
|
||||
}
|
||||
// 生产环境调试:连接生产服务器 + 可断点/日志 + 保留调试 UI
|
||||
create("debugProd") {
|
||||
buildConfigField("Boolean", "IS_DEBUG_MODE", "true")
|
||||
buildConfigField("Boolean", "USE_PROD_SERVER", "true")
|
||||
applicationIdSuffix = ".debug"
|
||||
versionNameSuffix = "-debugProd"
|
||||
}
|
||||
release {
|
||||
buildConfigField("Boolean", "IS_DEBUG_MODE", "false") // 生产模式
|
||||
buildConfigField("Boolean", "IS_DEBUG_MODE", "false")
|
||||
buildConfigField("Boolean", "USE_PROD_SERVER", "true")
|
||||
|
||||
// 使用 release 签名配置
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
@@ -90,7 +97,7 @@ android {
|
||||
val variant = this
|
||||
variant.outputs.all {
|
||||
val output = this as com.android.build.gradle.internal.api.BaseVariantOutputImpl
|
||||
val appName = "岁月史书"
|
||||
val appName = "岁月时书"
|
||||
val versionName = variant.versionName
|
||||
val buildType = variant.buildType.name
|
||||
output.outputFileName = "${appName}_v${versionName}_${buildType}.apk"
|
||||
|
||||
Reference in New Issue
Block a user