11group ' io.ably.flutter.plugin'
2- version ' 1.0'
2+ // Use the snapshot suffix to show that build artifacts are not shared.
3+ // This Gradle file is used by Flutter to build itself.
4+ version ' 1.0-SNAPSHOT'
35
46buildscript {
57 repositories {
68 google()
7- mavenCentral() // for firebase-messaging
9+ mavenCentral()
810 }
911
1012 dependencies {
11- classpath ' com.android.tools.build:gradle:7.4.0 '
13+ classpath ' com.android.tools.build:gradle:8.12.1 '
1214 }
1315}
1416
@@ -26,36 +28,25 @@ dependencies {
2628 implementation ' io.ably:ably-android:1.2.40'
2729
2830 // https://firebase.google.com/docs/cloud-messaging/android/client
29- implementation ' com.google.firebase:firebase-messaging:23.0.4'
30-
31- // https://github.com/google/desugar_jdk_libs
32- coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:1.1.5'
31+ implementation ' com.google.firebase:firebase-messaging:23.0.6'
3332}
3433
3534android {
36- compileSdkVersion 34
35+ // older version of flutter sdk doesn't provide `compileSdkVersion` defaults to 34
36+ compileSdkVersion flutter. compileSdkVersion ?: 34
3737
3838 // Conditional for compatibility with AGP <4.2.
3939 if (project. android. hasProperty(" namespace" )) {
4040 namespace ' io.ably.flutter.plugin'
4141 }
4242
43- // Require Java language level 8 so we can use Method References (used with Lambdas)
4443 compileOptions {
45- sourceCompatibility JavaVersion . VERSION_1_8
46- targetCompatibility JavaVersion . VERSION_1_8
47-
48- // Flag to enable Java 8 language APIs while supporting to older SDK Versions
49- coreLibraryDesugaringEnabled true
44+ sourceCompatibility = JavaVersion . VERSION_17
45+ targetCompatibility = JavaVersion . VERSION_17
5046 }
5147
5248 defaultConfig {
5349 minSdkVersion 19
54-
55- // Required when setting minSdkVersion to 20 or lower so we can use
56- // the Java 8 language APIs as mentioned here:
57- // https://developer.android.com/studio/write/java8-support#library-desugaring
58- multiDexEnabled true
5950 testInstrumentationRunner " androidx.test.runner.AndroidJUnitRunner"
6051 }
6152 lintOptions {
@@ -66,4 +57,10 @@ android {
6657 }
6758}
6859
60+ gradle. projectsEvaluated {
61+ tasks. withType(JavaCompile ) {
62+ options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
63+ }
64+ }
65+
6966apply from : file(" ./ably-agent.gradle" )
0 commit comments