@@ -21,12 +21,18 @@ if (flutterVersionName == null) {
2121 flutterVersionName = ' 1.0'
2222}
2323
24+ def keystoreProperties = new Properties ()
25+ def keystorePropertiesFile = rootProject. file(' key.properties' )
26+ if (keystorePropertiesFile. exists()) {
27+ keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
28+ }
29+
2430apply plugin : ' com.android.application'
2531apply plugin : ' kotlin-android'
2632apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
2733
2834android {
29- compileSdkVersion 28
35+ compileSdkVersion 29
3036
3137 sourceSets {
3238 main. java. srcDirs + = ' src/main/kotlin'
@@ -37,19 +43,35 @@ android {
3743 }
3844
3945 defaultConfig {
40- // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4146 applicationId " com.example.contraflutterkit"
42- minSdkVersion 16
43- targetSdkVersion 28
47+ minSdkVersion 19
48+ targetSdkVersion 29
4449 versionCode flutterVersionCode. toInteger()
4550 versionName flutterVersionName
4651 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
4752 }
4853
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+
4966 buildTypes {
5067 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 {
5375 signingConfig signingConfigs. debug
5476 }
5577 }
@@ -62,6 +84,6 @@ flutter {
6284dependencies {
6385 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
6486 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 '
6789}
0 commit comments