Skip to content

Commit 568c8a4

Browse files
author
Iiro Krankka
committed
Update release config for android.
1 parent 2bf8d13 commit 568c8a4

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

android/app/build.gradle

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ if (flutterRoot == null) {
1414
apply plugin: 'com.android.application'
1515
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
1616

17+
def keystorePropertiesFile = rootProject.file("key.properties")
18+
def keystoreProperties = new Properties()
19+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
20+
1721
android {
1822
compileSdkVersion 27
1923

@@ -30,11 +34,17 @@ android {
3034
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
3135
}
3236

37+
signingConfigs {
38+
release {
39+
keyAlias keystoreProperties['keyAlias']
40+
keyPassword keystoreProperties['keyPassword']
41+
storeFile file(keystoreProperties['storeFile'])
42+
storePassword keystoreProperties['storePassword']
43+
}
44+
}
3345
buildTypes {
3446
release {
35-
// TODO: Add your own signing config for the release build.
36-
// Signing with the debug keys for now, so `flutter run --release` works.
37-
signingConfig signingConfigs.debug
47+
signingConfig signingConfigs.release
3848
}
3949
}
4050
}

0 commit comments

Comments
 (0)