Skip to content

Commit 5e6ee98

Browse files
committed
Configured signing for release (again, sigh...)
1 parent 70f2a12 commit 5e6ee98

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

android/app/build.gradle

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
2525
apply plugin: 'kotlin-android'
2626
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
2727

28+
def keystoreProperties = new Properties()
29+
def keystorePropertiesFile = rootProject.file('key.properties')
30+
if (keystorePropertiesFile.exists()) {
31+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
32+
}
33+
2834
android {
2935
compileSdkVersion flutter.compileSdkVersion
3036

@@ -42,11 +48,21 @@ android {
4248
versionName flutterVersionName
4349
}
4450

51+
signingConfigs {
52+
release {
53+
keyAlias keystoreProperties['keyAlias']
54+
keyPassword keystoreProperties['keyPassword']
55+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
56+
storePassword keystoreProperties['storePassword']
57+
}
58+
}
59+
4560
buildTypes {
4661
release {
4762
// TODO: Add your own signing config for the release build.
4863
// Signing with the debug keys for now, so `flutter run --release` works.
49-
signingConfig signingConfigs.debug
64+
// signingConfig signingConfigs.debug
65+
signingConfig signingConfigs.release
5066
}
5167
}
5268
}

0 commit comments

Comments
 (0)