固定 1.1.3 的 Android 调试证书 (#4)
把已发布 1.1.3 APK 使用的调试密钥写入仓库,后续版本用同一把证书签名,以便覆盖安装。未改动 v1.1.3 标签,也未替换已发布安装包。
This commit is contained in:
1 parent
340bdbd9e8
commit
846e40c023
5 files changed
+33
-4
No files matched your search
@@ -29,10 +29,28 @@ android {
|
||||
versionName = flutter.versionName
|
||||
}
|
||||
|
||||
// 1.1.3 及以后的 debug / release 都用仓库里的这一把。缺文件就失败,不要回退到本机新建的 debug.keystore。
|
||||
val sharedDebugKeystore = rootProject.file("keystore/debug.keystore")
|
||||
if (!sharedDebugKeystore.isFile) {
|
||||
throw GradleException(
|
||||
"缺少 client/android/keystore/debug.keystore。后续版本必须沿用 1.1.3 的调试证书,不要另建密钥。",
|
||||
)
|
||||
}
|
||||
|
||||
signingConfigs {
|
||||
getByName("debug") {
|
||||
storeFile = sharedDebugKeystore
|
||||
storePassword = "android"
|
||||
keyAlias = "androiddebugkey"
|
||||
keyPassword = "android"
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
debug {
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig = signingConfigs.getByName("debug")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user