File tree Expand file tree Collapse file tree 1 file changed +20
-7
lines changed
Expand file tree Collapse file tree 1 file changed +20
-7
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ apply plugin: 'com.android.application'
2525apply plugin : ' kotlin-android'
2626apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
2727
28+ // 🔐 For apk signing
29+ def keystoreProperties = new Properties ()
30+ def keystorePropertiesFile = rootProject. file(' key.properties' )
31+ if (keystorePropertiesFile. exists()) {
32+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
33+ }
34+
2835android {
2936 compileSdkVersion 30
3037
@@ -41,13 +48,19 @@ android {
4148 versionName flutterVersionName
4249 }
4350
44- buildTypes {
45- release {
46- // TODO: Add your own signing config for the release build.
47- // Signing with the debug keys for now, so `flutter run --release` works.
48- signingConfig signingConfigs. debug
49- }
50- }
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+ buildTypes {
60+ release {
61+ signingConfig signingConfigs. release
62+ }
63+ }
5164}
5265
5366flutter {
You can’t perform that action at this time.
0 commit comments