Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add signing config #623

Merged
merged 1 commit into from
Sep 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading