Files
android-client/docs/deployment.md
2026-09-03 19:03:35 +08:00

28 lines
995 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 构建与部署
## 构建
```bash
./gradlew :app:assembleDebug # 调试 APK(app/build/outputs/apk/debug/)
./gradlew :app:assembleRelease # 发布 APK(未启用混淆,签名见下)
./gradlew installDebug # 安装到已连接设备
```
## 签名
当前发布构建**未配置签名**,也**未启用 R8 混淆**(`minify` 关闭)。接入真实发布前需:
1. 生成/配置 keystore(`keystore.properties` 或环境变量)。
2. 在 `app/build.gradle.kts` 配置 `signingConfigs` 与 `release` buildType 的签名。
3. 需要时启用 R8(`isMinifyEnabled = true` + proguard 规则)。
## 环境
- JDK 17+(`settings.gradle.kts` 有版本检查)。
- Android SDK 路径见 `local.properties`(`sdk.dir`)。
- `compileSdk` 37 / `minSdk` 28 / `targetSdk` 37。
## CI
`.github/workflows/ci.yml` 在推送 GitHub 后自动运行 `spotlessCheck → test/testDebugUnitTest → :app:assembleDebug → verifyArchitecture → lintDebug`。