From 630922f6634a333cb11ec25967d0b7811a961ca1 Mon Sep 17 00:00:00 2001 From: Shengqi Chen Date: Thu, 4 Apr 2024 18:45:09 +0800 Subject: [PATCH] Bump Java to 17, AGP to 7.4.2, Kotlin to 1.9.23 Signed-off-by: Shengqi Chen --- android/build.gradle | 8 ++++---- android/gradle.properties | 4 ++-- android/gradle/wrapper/gradle-wrapper.properties | 2 +- .../im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt | 2 +- example/android/app/build.gradle | 10 +++++----- example/android/gradle.properties | 4 ++-- .../android/gradle/wrapper/gradle-wrapper.properties | 2 +- example/pubspec.lock | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 4a23601..12fe78a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -17,11 +17,11 @@ android { namespace 'im.nfc.flutter_nfc_kit' - compileSdkVersion 33 + compileSdkVersion 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } sourceSets { @@ -39,5 +39,5 @@ android { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$KotlinVersion" implementation "org.jetbrains.kotlin:kotlin-reflect:$KotlinVersion" - implementation 'androidx.core:core-ktx:1.10.1' + implementation 'androidx.core:core-ktx:1.12.0' } diff --git a/android/gradle.properties b/android/gradle.properties index 39a8970..6d30e1f 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -AGPVersion=7.0.4 -KotlinVersion=1.9.10 \ No newline at end of file +AGPVersion=7.4.2 +KotlinVersion=1.9.23 \ No newline at end of file diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 4a16027..543c293 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Fri Sep 08 22:01:14 CST 2023 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt b/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt index 3a96d64..055770a 100644 --- a/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt +++ b/android/src/main/kotlin/im/nfc/flutter_nfc_kit/FlutterNfcKitPlugin.kt @@ -451,7 +451,7 @@ class FlutterNfcKitPlugin : FlutterPlugin, MethodCallHandler, ActivityAware { result.error("408", "Polling tag timeout", null) } - val pollHandler: NfcAdapter.ReaderCallback = { tag -> + val pollHandler = NfcAdapter.ReaderCallback { tag -> pollingTimeoutTask?.cancel() // common fields diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle index 9933fee..df50424 100644 --- a/example/android/app/build.gradle +++ b/example/android/app/build.gradle @@ -31,11 +31,11 @@ android { namespace 'im.nfc.flutter_nfc_kit.example' - compileSdkVersion 33 + compileSdkVersion 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_11 - targetCompatibility JavaVersion.VERSION_11 + sourceCompatibility JavaVersion.VERSION_17 + targetCompatibility JavaVersion.VERSION_17 } sourceSets { @@ -46,8 +46,8 @@ android { defaultConfig { applicationId "im.nfc.flutter_nfc_kit_example" minSdkVersion 19 - targetSdkVersion 33 - compileSdkVersion 33 + targetSdkVersion 34 + compileSdkVersion 34 versionCode flutterVersionCode.toInteger() versionName flutterVersionName testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" diff --git a/example/android/gradle.properties b/example/android/gradle.properties index 39a8970..6d30e1f 100644 --- a/example/android/gradle.properties +++ b/example/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -AGPVersion=7.0.4 -KotlinVersion=1.9.10 \ No newline at end of file +AGPVersion=7.4.2 +KotlinVersion=1.9.23 \ No newline at end of file diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties index 3d9b080..edeb00a 100644 --- a/example/android/gradle/wrapper/gradle-wrapper.properties +++ b/example/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStorePath=wrapper/dists zipStoreBase=GRADLE_USER_HOME -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip diff --git a/example/pubspec.lock b/example/pubspec.lock index 9aa70da..b0e1f42 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -107,10 +107,10 @@ packages: dependency: transitive description: name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "0.7.1" json_annotation: dependency: transitive description: