@@ -21,12 +21,18 @@ if (flutterVersionName == null) {
21
21
flutterVersionName = ' 1.0'
22
22
}
23
23
24
+ def keystoreProperties = new Properties ()
25
+ def keystorePropertiesFile = rootProject. file(' key.properties' )
26
+ if (keystorePropertiesFile. exists()) {
27
+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
28
+ }
29
+
24
30
apply plugin : ' com.android.application'
25
31
apply plugin : ' kotlin-android'
26
32
apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27
33
28
34
android {
29
- compileSdkVersion 28
35
+ compileSdkVersion 29
30
36
31
37
sourceSets {
32
38
main. java. srcDirs + = ' src/main/kotlin'
@@ -37,19 +43,35 @@ 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
46
applicationId " com.example.contraflutterkit"
42
- minSdkVersion 16
43
- targetSdkVersion 28
47
+ minSdkVersion 19
48
+ targetSdkVersion 29
44
49
versionCode flutterVersionCode. toInteger()
45
50
versionName flutterVersionName
46
51
testInstrumentationRunner " androidx.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
+ debug {
62
+
63
+ }
64
+ }
65
+
49
66
buildTypes {
50
67
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.
68
+ signingConfig signingConfigs. release
69
+ minifyEnabled true
70
+ useProguard true
71
+ proguardFiles getDefaultProguardFile(' proguard-android.txt' ), ' proguard-rules.pro'
72
+ }
73
+
74
+ debug {
53
75
signingConfig signingConfigs. debug
54
76
}
55
77
}
@@ -62,6 +84,6 @@ flutter {
62
84
dependencies {
63
85
implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
64
86
testImplementation ' junit:junit:4.12'
65
- androidTestImplementation ' androidx.test:runner :1.1.1'
66
- androidTestImplementation ' androidx.test.espresso:espresso-core:3.1.1 '
87
+ androidTestImplementation ' androidx.test.ext:junit :1.1.1'
88
+ androidTestImplementation ' androidx.test.espresso:espresso-core:3.2.0 '
67
89
}
0 commit comments