Skip to content

Commit ae1b45b

Browse files
author
Derik Thirion
committed
Changes for release
1 parent 39cfb16 commit ae1b45b

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

android/app/build.gradle

+21-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ if (localPropertiesFile.exists()) {
66
}
77
}
88

9+
def keystoreProperties = new Properties()
10+
def keystorePropertiesFile = rootProject.file('key.properties')
11+
if (keystorePropertiesFile.exists()) {
12+
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
13+
}
14+
915
def flutterRoot = localProperties.getProperty('flutter.sdk')
1016
if (flutterRoot == null) {
1117
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
@@ -50,11 +56,23 @@ android {
5056
versionName flutterVersionName
5157
}
5258

59+
signingConfigs {
60+
release {
61+
keyAlias keystoreProperties['keyAlias']
62+
keyPassword keystoreProperties['keyPassword']
63+
storeFile keystoreProperties['storeFile'] ? file(keystoreProperties['storeFile']) : null
64+
storePassword keystoreProperties['storePassword']
65+
}
66+
}
67+
5368
buildTypes {
69+
// release {
70+
// // TODO: Add your own signing config for the release build.
71+
// // Signing with the debug keys for now, so `flutter run --release` works.
72+
// signingConfig signingConfigs.debug
73+
// }
5474
release {
55-
// TODO: Add your own signing config for the release build.
56-
// Signing with the debug keys for now, so `flutter run --release` works.
57-
signingConfig signingConfigs.debug
75+
signingConfig signingConfigs.release
5876
}
5977
}
6078
}

0 commit comments

Comments
 (0)