1
+ def keystoreProperties = new Properties ()
2
+ def keystorePropertiesFile = rootProject. file(' key.properties' )
3
+ if (keystorePropertiesFile. exists()) {
4
+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
5
+ }
6
+
1
7
def localProperties = new Properties ()
2
8
def localPropertiesFile = rootProject. file(' local.properties' )
3
9
if (localPropertiesFile. exists()) {
@@ -26,7 +32,7 @@ apply plugin: 'kotlin-android'
26
32
apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27
33
28
34
android {
29
- compileSdkVersion 27
35
+ compileSdkVersion 28
30
36
31
37
sourceSets {
32
38
main. java. srcDirs + = ' src/main/kotlin'
@@ -37,20 +43,30 @@ android {
37
43
}
38
44
39
45
defaultConfig {
40
- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41
- applicationId " com.droidknights.droidknights"
46
+ applicationId " com.droidknights.flutterdroidknights"
42
47
minSdkVersion 16
43
- targetSdkVersion 27
48
+ targetSdkVersion 28
44
49
versionCode flutterVersionCode. toInteger()
45
50
versionName flutterVersionName
46
51
testInstrumentationRunner " android.support.test.runner.AndroidJUnitRunner"
47
52
}
48
53
54
+ signingConfigs {
55
+ release {
56
+ keyAlias keystoreProperties[' keyAlias' ]
57
+ keyPassword keystoreProperties[' keyPassword' ]
58
+ storeFile file(keystoreProperties[' storeFile' ])
59
+ storePassword keystoreProperties[' storePassword' ]
60
+ }
61
+ }
62
+
49
63
buildTypes {
50
64
release {
51
- // TODO: Add your own signing config for the release build.
52
- // Signing with the debug keys for now, so `flutter run --release` works.
53
- signingConfig signingConfigs. debug
65
+ minifyEnabled true
66
+ useProguard true
67
+
68
+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
69
+ signingConfig signingConfigs. release
54
70
}
55
71
}
56
72
}
0 commit comments