Skip to content

Commit

Permalink
Make signingConfig conditional in build.gradle (flutter#941)
Browse files Browse the repository at this point in the history
## Description

Making `signingConfig` conditional to the existence of
`keystorePropertiesFile` will help to avoid comment-uncomment lines by
hand.

## Tests

No Tests are required.

## Issues

Fixes None

---

>**Note**: Please find the development and releasing instructions at
https://github.com/flutter/gallery#development

Co-authored-by: Pierre-Louis <[email protected]>
  • Loading branch information
hrishikesh-kadam and guidezpl authored May 3, 2023
1 parent e3ed6aa commit 6526542
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,11 @@ android {

buildTypes {
release {
// Uncomment to run flutter build apk or flutter run --release locally
// signingConfig signingConfigs.debug

signingConfig signingConfigs.release
if (keystorePropertiesFile.exists()) {
signingConfig signingConfigs.release
} else {
signingConfig signingConfigs.debug
}
}
}
}
Expand Down

0 comments on commit 6526542

Please sign in to comment.