1+ plugins {
2+ id " com.android.application"
3+ id " kotlin-android"
4+ id " dev.flutter.flutter-gradle-plugin"
5+ }
6+
17def localProperties = new Properties ()
28def localPropertiesFile = rootProject. file(' local.properties' )
39if (localPropertiesFile. exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
612 }
713}
814
9- def flutterRoot = localProperties. getProperty(' flutter.sdk' )
10- if (flutterRoot == null ) {
11- throw new GradleException (" Flutter SDK not found. Define location with flutter.sdk in the local.properties file." )
12- }
13-
1415def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
1516if (flutterVersionCode == null ) {
1617 flutterVersionCode = ' 1'
@@ -21,18 +22,14 @@ if (flutterVersionName == null) {
2122 flutterVersionName = ' 1.0'
2223}
2324
24- apply plugin : ' com.android.application'
25- apply plugin : ' kotlin-android'
26- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27-
2825def keystoreProperties = new Properties ()
2926def keystorePropertiesFile = rootProject. file(' key.properties' )
3027if (keystorePropertiesFile. exists()) {
3128 keystoreProperties. load(new FileInputStream (keystorePropertiesFile))
3229}
3330
3431android {
35- compileSdkVersion 33
32+ compileSdkVersion 34
3633 ndkVersion flutter. ndkVersion
3734
3835 compileOptions {
@@ -53,7 +50,7 @@ android {
5350 applicationId " com.app.netshare"
5451 // You can update the following values to match your application needs.
5552 // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
56- minSdkVersion 20
53+ minSdkVersion flutter . minSdkVersion
5754 targetSdkVersion flutter. targetSdkVersion
5855 versionCode flutterVersionCode. toInteger()
5956 versionName flutterVersionName
@@ -72,14 +69,12 @@ android {
7269 // signingConfig signingConfigs.debug
7370
7471 signingConfig signingConfigs. release
72+ shrinkResources true
73+ minifyEnabled true
7574 }
7675 }
7776}
7877
7978flutter {
8079 source ' ../..'
8180}
82-
83- dependencies {
84- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
85- }
0 commit comments