chore(android): 发布签名证书与口令随私有仓库托管
CI / backend (push) Waiting to run

按用户要求把 dadao-release.jks 与 keystore.properties 入库,保证任何机器 clone 后可直接 assembleRelease;证书从 .local/keystore 挪到 android/keystore,.gitignore 对这两个文件开例外。仓库泄露即等于证书泄露,届时需换证书重新发版。
This commit is contained in:
Steven
2026-11-11 23:29:15 +08:00
parent 45d3222db6
commit 40415d8f76
4 changed files with 16 additions and 5 deletions
+8 -5
View File
@@ -43,7 +43,7 @@ android {
* 原因:CI 与受限沙箱里 `~/.android` 常常不可写,AGP 会去建
* `debug.keystore.lock` 然后 AccessDenied,构建在 validateSigningDebug 这一步失败。
* 放在工程里就能在任何机器上直接 assembleDebug。
* 注意:这只是调试签名,release 必须换成真正的证书并走 secret 注入。
* 注意:这只是调试签名,release 用 android/keystore/dadao-release.jks。
*/
signingConfigs {
getByName("debug") {
@@ -53,11 +53,14 @@ android {
keyPassword = "android"
}
/**
* 发布签名从 android/keystore.properties 读,证书本身不进仓库。
* 发布签名从 android/keystore.properties 读。
*
* 没有这个文件(别人 clone 下来、CI 没注入)时回落到调试签名:
* assembleRelease 依然能跑,只是装不上已经装了正式版的机器——
* 而这正是应该发生的:发布包的签名只能由发布者本人持有。
* 证书和口令按用户要求随私有仓库托管(.gitignore 对这两个文件开了例外),
* 这样任何机器 clone 下来都能直接出正式包;代价是仓库泄露即等于证书泄露,
* 届时必须换证书并让 OTA 重新发版。
*
* 没有 keystore.properties 时回落到调试签名,assembleRelease 依然能跑,
* 只是装不上已经装了正式版的机器。
*/
create("release") {
val file = rootProject.file("keystore.properties")