Skip to content

Commit

Permalink
Add signing config
Browse files Browse the repository at this point in the history
  • Loading branch information
ademar111190 committed Sep 27, 2023
1 parent 9e6dcbc commit 231cc1e
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,46 @@ android {
multiDexEnabled true
}

def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}

signingConfigs {
release {
String filePath = keystoreProperties['storeFile']
if (filePath != null) {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(filePath)
storePassword keystoreProperties['storePassword']
} else {
println("No storeFile provided, release builds are not possible")
}
}
debug {
String filePath = keystoreProperties['storeFileDebug']
if (filePath != null) {
keyAlias keystoreProperties['aliasDebug']
keyPassword keystoreProperties['passwordDebug']
storeFile file(filePath)
storePassword keystoreProperties['passwordDebug']
} else {
println("No storeFile provided, debug builds are using your local debug keystore")
}
}
}

buildTypes {
debug {
signingConfig signingConfigs.debug
applicationIdSuffix '.debug'
versionNameSuffix '-DEBUG'
resValue "string", "app_name", "Breez Cloud - 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.debug
signingConfig signingConfigs.release
resValue "string", "app_name", "Breez Cloud"
}
}
Expand Down

0 comments on commit 231cc1e

Please sign in to comment.