Sign the release build

This commit is contained in:
Elias Projahn 2020-05-23 11:13:04 +02:00
parent c8a93c715f
commit d03ae9c869
2 changed files with 17 additions and 3 deletions

1
android/.gitignore vendored
View file

@ -3,5 +3,6 @@ gradle-wrapper.jar
/captures/
/gradlew
/gradlew.bat
/key.properties
/local.properties
GeneratedPluginRegistrant.java

View file

@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
@ -44,11 +50,18 @@ android {
versionName flutterVersionName
}
signingConfigs {
release {
storeFile = keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
storePassword = keystoreProperties['storePassword']
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
}
}
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
signingConfig signingConfigs.release
}
}
}