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,26 +22,23 @@ 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-
2825android {
29- compileSdkVersion 33
26+ namespace " com.example.example"
27+ compileSdk 36
3028
3129 sourceSets {
3230 main. java. srcDirs + = ' src/main/kotlin'
3331 }
3432
35- lintOptions {
33+ lint {
3634 disable ' InvalidPackage'
3735 }
3836
3937 defaultConfig {
4038 // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
4139 applicationId " com.example.example"
42- minSdkVersion 21
43- targetSdkVersion 30
40+ minSdkVersion 24
41+ targetSdkVersion 35
4442 versionCode flutterVersionCode. toInteger()
4543 versionName flutterVersionName
4644 }
@@ -52,6 +50,16 @@ android {
5250 signingConfig signingConfigs. debug
5351 }
5452 }
53+ compileOptions {
54+ sourceCompatibility JavaVersion . VERSION_21
55+ targetCompatibility JavaVersion . VERSION_21
56+ coreLibraryDesugaringEnabled true
57+ }
58+
59+ kotlinOptions {
60+ jvmTarget = ' 21'
61+ }
62+
5563}
5664
5765flutter {
@@ -60,4 +68,5 @@ flutter {
6068
6169dependencies {
6270 implementation " org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version "
71+ coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:2.1.4'
6372}
0 commit comments