fix: 文案改用字符串资源,补齐 .gitignore/.gitattributes 与依赖降级依据

This commit is contained in:
2026-09-10 10:17:12 +08:00
parent 2a90c18317
commit 3cbcafd4e2
5 changed files with 27 additions and 5 deletions
+9
View File
@@ -0,0 +1,9 @@
# 统一换行符,避免跨平台克隆后脚本不可执行。
# Windows 上 core.autocrlf=true 时,若不做此声明,gradlew 会被检出成 CRLF,
# 在 Linux/macOS/Git Bash 下报 "/bin/sh^M: bad interpreter"。
gradlew text eol=lf
*.sh text eol=lf
*.bat text eol=crlf
*.jar binary
*.png binary
*.webp binary
+1
View File
@@ -4,6 +4,7 @@ local.properties
.idea/
.DS_Store
build/
.kotlin/
captures/
.externalNativeBuild/
.cxx/
@@ -11,6 +11,7 @@ import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
/** 唯一 Activity,承载 Compose 界面。 */
class MainActivity : ComponentActivity() {
@@ -21,7 +22,8 @@ class MainActivity : ComponentActivity() {
MaterialTheme {
Surface(modifier = Modifier.fillMaxSize()) {
Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
Text("RingHealth")
// 文案取自 res/values/strings.xml,不在 Kotlin 里硬编码用户可见文字
Text(stringResource(R.string.app_name))
}
}
}
+14 -4
View File
@@ -1,10 +1,20 @@
[versions]
agp = "8.13.1"
kotlin = "2.2.20"
# 以下四个版本已按「compileSdk 36 + AGP 8.13.1」上限下调:
# 1.19.0 / 2.11.0 / 2.10.1 / 2026.09.00 均要求 compileSdk 37 + AGP 9.1.0,
# 与本机已装工具链(platform 36、AGP 8.13.1)不符,checkDebugAarMetadata 会直接失败。
# 当前取各自 AAR 元数据中 minCompileSdk<=36 且 minAGP<=8.13.1 的最新版本。
# !!请勿把下面四个版本改回 1.19.0 / 2.11.0 / 2.10.1 / 2026.09.00 !!
#
# 那组版本要求 compileSdk 37 + AGP 9.1.0,与本计划钉死的工具链
# (compileSdk 36 + AGP 8.13.1,见 Ruling R5)互斥,会导致
# `:app:checkDebugAarMetadata` 直接失败并抛出 32 条 AAR 元数据冲突。
#
# 裁定依据:Ruling R5(工具链以本机已装版本为准,权威)+
# Ruling R6(批准将越界依赖下调至工具链可接受的最新版本)。
# 验证方法:读取各依赖 AAR 自带的
# META-INF/com/android/build/gradle/aar-metadata.properties,
# 取其中 minCompileSdk<=36 且 minAndroidGradlePluginVersion<=8.13.1
# 的最新版本。实测:core-ktx 1.18.0 / lifecycle 2.10.0 /
# navigation-compose 2.9.8 / compose-bom 2026.06.01(compose 1.11.4)。
# 若将来升级 AGP 与 compileSdk 到 37+,方可一并回改这四行。
coreKtx = "1.18.0"
activityCompose = "1.13.0"
lifecycle = "2.10.0"
Vendored Regular → Executable
View File