|
1 | 1 | plugins { |
2 | 2 | id "com.android.application" |
| 3 | + // START: FlutterFire Configuration |
| 4 | + id "com.google.gms.google-services" |
| 5 | + // END: FlutterFire Configuration |
3 | 6 | id "kotlin-android" |
| 7 | + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. |
4 | 8 | id "dev.flutter.flutter-gradle-plugin" |
5 | 9 | } |
6 | 10 |
|
7 | | -def localProperties = new Properties() |
8 | | -def localPropertiesFile = rootProject.file('local.properties') |
9 | | -if (localPropertiesFile.exists()) { |
10 | | - localPropertiesFile.withReader('UTF-8') { reader -> |
11 | | - localProperties.load(reader) |
12 | | - } |
13 | | -} |
14 | | - |
15 | | - |
16 | | -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') |
17 | | -if (flutterVersionCode == null) { |
18 | | - flutterVersionCode = '1' |
19 | | -} |
20 | | - |
21 | | -def flutterVersionName = localProperties.getProperty('flutter.versionName') |
22 | | -if (flutterVersionName == null) { |
23 | | - flutterVersionName = '1.0' |
24 | | -} |
25 | | - |
26 | 11 | android { |
27 | 12 | namespace "io.getstream.chat.android.flutter.sample" |
| 13 | + compileSdkVersion flutter.compileSdkVersion |
| 14 | + ndkVersion "27.0.12077973" |
28 | 15 |
|
29 | | - compileSdkVersion 35 |
30 | | - |
31 | | - ndkVersion "26.2.11394342" |
32 | | - |
33 | | - sourceSets { |
34 | | - main.java.srcDirs += 'src/main/kotlin' |
| 16 | + compileOptions { |
| 17 | + sourceCompatibility JavaVersion.VERSION_11 |
| 18 | + targetCompatibility JavaVersion.VERSION_11 |
| 19 | + coreLibraryDesugaringEnabled true |
35 | 20 | } |
36 | 21 |
|
37 | | - lintOptions { |
38 | | - disable 'InvalidPackage' |
39 | | - checkReleaseBuilds false |
| 22 | + kotlinOptions { |
| 23 | + jvmTarget = JavaVersion.VERSION_11.toString() |
40 | 24 | } |
41 | 25 |
|
42 | 26 | defaultConfig { |
43 | 27 | applicationId "io.getstream.chat.android.flutter.sample" |
44 | | - minSdkVersion 23 |
45 | | - targetSdkVersion 35 |
46 | | - versionCode flutterVersionCode.toInteger() |
47 | | - versionName flutterVersionName |
48 | | - multiDexEnabled true |
49 | | - } |
50 | | - |
51 | | - compileOptions { |
52 | | - // Flag to enable support for the new language APIs |
53 | | - coreLibraryDesugaringEnabled true |
54 | | - } |
55 | | - |
56 | | - // Added this block: |
57 | | - afterEvaluate { project -> |
58 | | - if (project.hasProperty("kotlin")) { |
59 | | - project.tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { |
60 | | - kotlinOptions { |
61 | | - jvmTarget = "1.8" |
62 | | - } |
63 | | - } |
64 | | - } |
| 28 | + minSdkVersion Math.max(flutter.minSdkVersion, 23) |
| 29 | + targetSdkVersion flutter.targetSdkVersion |
| 30 | + versionCode flutter.versionCode |
| 31 | + versionName flutter.versionName |
65 | 32 | } |
66 | 33 |
|
67 | 34 | signingConfigs { |
@@ -93,5 +60,5 @@ flutter { |
93 | 60 | } |
94 | 61 |
|
95 | 62 | dependencies { |
96 | | - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2' |
| 63 | + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4' |
97 | 64 | } |
0 commit comments