ci: adjust build.gradle and setup signing configuration

This commit is contained in:
13574
2023-09-08 11:34:41 +08:00
parent 21764d2653
commit 70b38e8427
2 changed files with 16 additions and 4 deletions

View File

@@ -56,9 +56,20 @@ android {
buildTypes {
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.debug
if(System.getenv("CI")=="true"){
def keystoreFile=file("keystore.jks")
def keyAliasEnv=System.getenv("SIGNING_KEY_ALIAS")
def keystorePasswordEnv=System.getenv("SIGNING_STORE_PASSWORD")
def keyPasswordEnv=System.getenv("SIGNING_STORE_PASSWORD")
signingConfig{
storeFile keystoreFile
storePassword keystorePasswordEnv
keyAlias keyAliasEnv
keyPassword keyPasswordEnv
}
}else{
signingConfig signingConfigs.debug
}
}
}
}