Skip to content

Commit

Permalink
fix fallback to default keystore if key.properties file does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
smart7even committed Jan 6, 2024
1 parent 08cca70 commit a38ed65
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,22 @@ android {

signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
if (keystorePropertiesFile.exists()) {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword keystoreProperties['storePassword']
}
}
}

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.release
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
}

ndk {
abiFilters 'armeabi-v7a','arm64-v8a','x86_64'
Expand Down

0 comments on commit a38ed65

Please sign in to comment.