diff --git a/CHANGELOG.md b/CHANGELOG.md index e808aa4..8460a7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.1.0 +- Updates minimum supported SDK version to Flutter 3.44 / Dart 3.12 +- [Android] Migrates to built-in Kotlin (applies the Kotlin Gradle Plugin only on AGP < 9) + ## 6.0.4 - [Android] Updated compileSdkVersion to 36, Gradle to 8.14 and Java/Kotlin compatibility to version 17 diff --git a/android/build.gradle b/android/build.gradle index 7a689d1..1347068 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -23,7 +23,12 @@ rootProject.allprojects { } apply plugin: 'com.android.library' -apply plugin: 'kotlin-android' + +// AGP 9+ has built-in Kotlin support; older versions need the plugin explicitly. +def agpMajor = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.')[0] as int +if (agpMajor < 9) { + apply plugin: 'kotlin-android' +} android { // Conditional for compatibility with AGP <4.2. @@ -38,10 +43,6 @@ android { targetCompatibility JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() - } - sourceSets { main.java.srcDirs += 'src/main/kotlin' } @@ -54,6 +55,12 @@ android { } } +kotlin { + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17 + } +} + dependencies { implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion" diff --git a/pubspec.yaml b/pubspec.yaml index ffc84c0..33ca536 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,12 +1,12 @@ name: flutter_archive description: Create and extract ZIP archive files in Android, iOS and macOS. Zip all files in a directory recursively or a given list of files. -version: 6.0.4 +version: 6.1.0 homepage: https://github.com/kineapps/flutter_archive repository: https://github.com/kineapps/flutter_archive environment: - sdk: '>=2.15.0 <4.0.0' - flutter: ">=2.8.0" + sdk: ^3.12.0 + flutter: ">=3.44.0" dependencies: flutter: