1
+ plugins {
2
+ id " com.android.application"
3
+ id " kotlin-android"
4
+ id " dev.flutter.flutter-gradle-plugin"
5
+ }
6
+
1
7
def localProperties = new Properties ()
2
8
def localPropertiesFile = rootProject. file(' local.properties' )
3
9
if (localPropertiesFile. exists()) {
@@ -6,11 +12,6 @@ if (localPropertiesFile.exists()) {
6
12
}
7
13
}
8
14
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
-
14
15
def flutterVersionCode = localProperties. getProperty(' flutter.versionCode' )
15
16
if (flutterVersionCode == null ) {
16
17
flutterVersionCode = ' 1'
@@ -21,15 +22,15 @@ if (flutterVersionName == null) {
21
22
flutterVersionName = ' 1.0'
22
23
}
23
24
24
- apply plugin : ' com.android.application'
25
- apply plugin : ' kotlin-android'
26
- apply from : " $flutterRoot /packages/flutter_tools/gradle/flutter.gradle"
27
-
28
25
android {
29
- compileSdkVersion 33
30
- ndkVersion flutter. ndkVersion
26
+ namespace ' com.webreinvent.vaahflutter'
27
+
28
+ compileSdkVersion 34
29
+ ndkVersion " 26.1.10909125"
31
30
32
31
compileOptions {
32
+ // TODO: coreLibraryDesugaringEnabled true is required for local notification
33
+ coreLibraryDesugaringEnabled true
33
34
sourceCompatibility JavaVersion . VERSION_1_8
34
35
targetCompatibility JavaVersion . VERSION_1_8
35
36
}
@@ -47,10 +48,11 @@ android {
47
48
applicationId " com.webreinvent.vaahflutter"
48
49
// You can update the following values to match your application needs.
49
50
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
50
- minSdkVersion 19
51
+ minSdkVersion flutter . minSdkVersion
51
52
targetSdkVersion flutter. targetSdkVersion
52
53
versionCode flutterVersionCode. toInteger()
53
54
versionName flutterVersionName
55
+ multiDexEnabled true
54
56
}
55
57
56
58
buildTypes {
@@ -67,5 +69,6 @@ flutter {
67
69
}
68
70
69
71
dependencies {
70
- implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
72
+ implementation " androidx.multidex:multidex:2.0.1"
73
+ coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:1.2.2'
71
74
}
0 commit comments