固定 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
@@ -7,8 +7,10 @@ gradle-wrapper.jar
|
||||
GeneratedPluginRegistrant.java
|
||||
.cxx/
|
||||
|
||||
# Remember to never publicly share your keystore.
|
||||
# Remember to never publicly share a new upload keystore.
|
||||
# See https://flutter.dev/to/reference-keystore
|
||||
key.properties
|
||||
**/*.keystore
|
||||
**/*.jks
|
||||
# 1.1.3 的调试证书必须留在仓库里,后面的版本才能覆盖安装。
|
||||
!keystore/debug.keystore
|
||||
@@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Android 签名
|
||||
|
||||
1.1.3 以及以后的 debug 和 release 都使用本目录的 `debug.keystore`。
|
||||
|
||||
- 别名 `androiddebugkey`
|
||||
- storepass 和 keypass 都是 `android`
|
||||
- 证书 SHA-256 必须是 `8bdbe4a3b25d611688d3e6f65524c87868217cdffd69d541eadd0916b7909c03`
|
||||
|
||||
这是已经发布的 1.1.3 安装包用的那一把。不要另建密钥,也不要换成应用商店证书,否则已安装的 1.1.3 无法覆盖升级。构建脚本在文件缺失时会直接失败。
|
||||
Binary file not shown.
Reference in new issue
Block a user