Commit 4303966 1 parent 8a7e62a commit 4303966 Copy full SHA for 4303966
File tree 1 file changed +25
-2
lines changed
1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ if (flutterRoot == null) {
14
14
apply plugin : ' com.android.application'
15
15
apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
16
16
17
+ def keystoreProperties = new Properties ()
18
+ def keystorePropertiesFile = rootProject. file(' key.properties' )
19
+ if (keystorePropertiesFile. exists()) {
20
+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
21
+ }
22
+
17
23
android {
18
24
compileSdkVersion 29
19
25
@@ -30,10 +36,27 @@ android {
30
36
testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
31
37
}
32
38
39
+ signingConfigs {
40
+ release {
41
+ if (System . getenv()[" CI" ]) { // CI=true is exported by Codemagic
42
+ storeFile file(System . getenv()[" FCI_KEYSTORE_PATH" ])
43
+ storePassword System . getenv()[" FCI_KEYSTORE_PASSWORD" ]
44
+ keyAlias System . getenv()[" FCI_KEY_ALIAS" ]
45
+ keyPassword System . getenv()[" FCI_KEY_PASSWORD" ]
46
+ } else {
47
+ keyAlias keystoreProperties[' keyAlias' ]
48
+ keyPassword keystoreProperties[' keyPassword' ]
49
+ storeFile keystoreProperties[' storeFile' ] ? file(keystoreProperties[' storeFile' ]) : null
50
+ storePassword keystoreProperties[' storePassword' ]
51
+ }
52
+ }
53
+ }
54
+
33
55
buildTypes {
34
56
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.
57
+ signingConfig signingConfigs. release
58
+ }
59
+ debug {
37
60
signingConfig signingConfigs. debug
38
61
}
39
62
}
You can’t perform that action at this time.
0 commit comments