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,32 +28,28 @@ 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 '
31+ implementation ' com.google.firebase:firebase-messaging:23.0.6 '
3032
3133 // https://github.com/google/desugar_jdk_libs
3234 coreLibraryDesugaring ' com.android.tools:desugar_jdk_libs:1.1.5'
3335}
3436
3537android {
36- compileSdkVersion 34
38+ // older version of flutter sdk doesn't provide `compileSdkVersion` defaults to 34
39+ compileSdkVersion flutter. compileSdkVersion ?: 34
3740
3841 // Conditional for compatibility with AGP <4.2.
3942 if (project. android. hasProperty(" namespace" )) {
4043 namespace ' io.ably.flutter.plugin'
4144 }
4245
43- // Require Java language level 8 so we can use Method References (used with Lambdas)
4446 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
47+ sourceCompatibility = JavaVersion . VERSION_17
48+ targetCompatibility = JavaVersion . VERSION_17
5049 }
5150
5251 defaultConfig {
5352 minSdkVersion 19
54-
5553 // Required when setting minSdkVersion to 20 or lower so we can use
5654 // the Java 8 language APIs as mentioned here:
5755 // https://developer.android.com/studio/write/java8-support#library-desugaring
@@ -66,4 +64,10 @@ android {
6664 }
6765}
6866
67+ gradle. projectsEvaluated {
68+ tasks. withType(JavaCompile ) {
69+ options. compilerArgs << " -Xlint:unchecked" << " -Xlint:deprecation"
70+ }
71+ }
72+
6973apply from : file(" ./ably-agent.gradle" )
0 commit comments