File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,3 +35,4 @@ lib/generated_plugin_registrant.dart
3535
3636# Exceptions to above rules.
3737! /packages /flutter_tools /test /data /dart_dependencies_test /** /.packages
38+ android /key.properties
Original file line number Diff line number Diff line change @@ -25,6 +25,12 @@ apply plugin: 'com.android.application'
2525apply plugin : ' kotlin-android'
2626apply 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+
2834android {
2935 compileSdkVersion 29
3036
@@ -46,11 +52,20 @@ android {
4652 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
4753 }
4854
55+ signingConfigs {
56+ release {
57+ keyAlias keystoreProperties[' keyAlias' ]
58+ keyPassword keystoreProperties[' keyPassword' ]
59+ storeFile keystoreProperties[' storeFile' ] ? file(keystoreProperties[' storeFile' ]) : null
60+ storePassword keystoreProperties[' storePassword' ]
61+ }
62+ }
63+
4964 buildTypes {
5065 release {
5166 // TODO: Add your own signing config for the release build.
5267 // Signing with the debug keys for now, so `flutter run --release` works.
53- signingConfig signingConfigs. debug
68+ signingConfig signingConfigs. release
5469 }
5570 }
5671}
You can’t perform that action at this time.
0 commit comments