From 4afc383a6db56cb969af5d8ad02a1a0220758b66 Mon Sep 17 00:00:00 2001 From: stuartmorgan Date: Sat, 5 Oct 2024 05:06:33 -0700 Subject: [PATCH] [various] Update Java compatibility version to 11 (#7795) Now that `stable` requires AGP 7.0, which in turn requires Java 11+, we should be able to set our compatibility version to 11 (setting the min Flutter SDK version to current stable). Also removes the gradle conditionals for setting namespace (and the repo tool checks that it is present), as that was only needed for AGP 4.1 compatibility. Part of https://github.com/flutter/flutter/issues/156111 --- packages/camera/camera_android/CHANGELOG.md | 5 +++ .../camera_android/android/build.gradle | 9 ++-- .../camera_android/example/pubspec.yaml | 4 +- packages/camera/camera_android/pubspec.yaml | 6 +-- .../camera_android_camerax/CHANGELOG.md | 4 ++ .../android/build.gradle | 9 ++-- .../example/android/app/build.gradle | 4 +- .../camera_android_camerax/pubspec.yaml | 2 +- packages/espresso/CHANGELOG.md | 5 +++ packages/espresso/android/build.gradle | 9 ++-- packages/espresso/example/pubspec.yaml | 4 +- packages/espresso/pubspec.yaml | 6 +-- .../example/android/app/build.gradle | 4 +- .../example/android/app/build.gradle | 6 +-- .../file_selector_android/CHANGELOG.md | 4 ++ .../android/build.gradle | 9 ++-- .../example/android/app/build.gradle | 4 +- .../file_selector_android/pubspec.yaml | 2 +- .../example/android/app/build.gradle | 6 +-- .../example/android/app/build.gradle | 6 +-- .../CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../pubspec.yaml | 6 +-- .../example/android/app/build.gradle | 6 +-- .../google_maps_flutter_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../google_maps_flutter_android/pubspec.yaml | 6 +-- .../google_sign_in_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../google_sign_in_android/pubspec.yaml | 6 +-- .../image_picker_android/CHANGELOG.md | 4 ++ .../image_picker_android/android/build.gradle | 9 ++-- .../image_picker_android/pubspec.yaml | 2 +- .../in_app_purchase_android/CHANGELOG.md | 4 ++ .../android/build.gradle | 9 ++-- .../in_app_purchase_android/pubspec.yaml | 2 +- packages/interactive_media_ads/CHANGELOG.md | 5 +++ .../android/build.gradle | 10 ++--- .../AdsRequestProxyApi.kt | 2 +- .../example/android/app/build.gradle | 6 +-- .../AdsRequestProxyAPIDelegate.swift | 2 +- packages/interactive_media_ads/pubspec.yaml | 2 +- .../local_auth_android/CHANGELOG.md | 4 ++ .../local_auth_android/android/build.gradle | 9 ++-- .../local_auth_android/pubspec.yaml | 2 +- .../path_provider_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../path_provider_android/pubspec.yaml | 6 +-- .../example/app/android/app/build.gradle | 6 +-- .../android/build.gradle | 9 ++-- .../example/android/app/build.gradle | 4 +- .../test_plugin/android/build.gradle | 11 ++--- .../example/android/app/build.gradle | 6 +-- .../quick_actions_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../quick_actions_android/pubspec.yaml | 6 +-- .../example/hello/android/app/build.gradle | 6 +-- .../example/local/android/app/build.gradle | 6 +-- .../example/remote/android/app/build.gradle | 6 +-- .../shared_preferences_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 11 ++--- .../example/pubspec.yaml | 4 +- .../shared_preferences_android/pubspec.yaml | 6 +-- .../example/android/app/build.gradle | 6 +-- .../url_launcher_android/CHANGELOG.md | 4 ++ .../url_launcher_android/android/build.gradle | 9 ++-- .../url_launcher_android/pubspec.yaml | 2 +- .../example/android/app/build.gradle | 4 +- .../video_player_android/CHANGELOG.md | 4 ++ .../video_player_android/android/build.gradle | 9 ++-- .../example/android/app/build.gradle | 4 +- .../video_player_android/example/pubspec.yaml | 4 +- .../video_player_android/pubspec.yaml | 2 +- .../webview_flutter_android/CHANGELOG.md | 5 +++ .../android/build.gradle | 9 ++-- .../example/pubspec.yaml | 4 +- .../webview_flutter_android/pubspec.yaml | 6 +-- script/tool/lib/src/gradle_check_command.dart | 44 +++---------------- .../tool/test/gradle_check_command_test.dart | 36 ++------------- 84 files changed, 250 insertions(+), 288 deletions(-) diff --git a/packages/camera/camera_android/CHANGELOG.md b/packages/camera/camera_android/CHANGELOG.md index 9f5c4aebe193..3b8bf9ac7b3b 100644 --- a/packages/camera/camera_android/CHANGELOG.md +++ b/packages/camera/camera_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.10.9+12 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 0.10.9+11 * Updates annotations lib to 1.8.2. diff --git a/packages/camera/camera_android/android/build.gradle b/packages/camera/camera_android/android/build.gradle index 6ea5b3c121bf..f389d464972f 100644 --- a/packages/camera/camera_android/android/build.gradle +++ b/packages/camera/camera_android/android/build.gradle @@ -30,10 +30,7 @@ android { buildFeatures { buildConfig true } - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.camera' - } + namespace 'io.flutter.plugins.camera' compileSdk 34 defaultConfig { @@ -46,8 +43,8 @@ buildFeatures { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } testOptions { diff --git a/packages/camera/camera_android/example/pubspec.yaml b/packages/camera/camera_android/example/pubspec.yaml index cd212825d74b..9c8f8476d0b5 100644 --- a/packages/camera/camera_android/example/pubspec.yaml +++ b/packages/camera/camera_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the camera plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: camera_android: diff --git a/packages/camera/camera_android/pubspec.yaml b/packages/camera/camera_android/pubspec.yaml index 4ddd429c519f..c65e2b07e8fe 100644 --- a/packages/camera/camera_android/pubspec.yaml +++ b/packages/camera/camera_android/pubspec.yaml @@ -3,11 +3,11 @@ description: Android implementation of the camera plugin. repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.10.9+11 +version: 0.10.9+12 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/camera/camera_android_camerax/CHANGELOG.md b/packages/camera/camera_android_camerax/CHANGELOG.md index e9cd8fc14d07..b1ecba94bf0e 100644 --- a/packages/camera/camera_android_camerax/CHANGELOG.md +++ b/packages/camera/camera_android_camerax/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.6.9+2 + +* Updates Java compatibility version to 11. + ## 0.6.9+1 * Bumps `com.google.guava:guava` from `33.3.0` to `33.3.1`. diff --git a/packages/camera/camera_android_camerax/android/build.gradle b/packages/camera/camera_android_camerax/android/build.gradle index 311d766ded2c..55a89f610715 100644 --- a/packages/camera/camera_android_camerax/android/build.gradle +++ b/packages/camera/camera_android_camerax/android/build.gradle @@ -22,16 +22,13 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.camerax' - } + namespace 'io.flutter.plugins.camerax' // CameraX dependencies require compilation against version 33 or later. compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/camera/camera_android_camerax/example/android/app/build.gradle b/packages/camera/camera_android_camerax/example/android/app/build.gradle index c9117991074d..9da443c271b3 100644 --- a/packages/camera/camera_android_camerax/example/android/app/build.gradle +++ b/packages/camera/camera_android_camerax/example/android/app/build.gradle @@ -31,8 +31,8 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/camera/camera_android_camerax/pubspec.yaml b/packages/camera/camera_android_camerax/pubspec.yaml index 3f4cc1666743..60a0a82bb4aa 100644 --- a/packages/camera/camera_android_camerax/pubspec.yaml +++ b/packages/camera/camera_android_camerax/pubspec.yaml @@ -2,7 +2,7 @@ name: camera_android_camerax description: Android implementation of the camera plugin using the CameraX library. repository: https://github.com/flutter/packages/tree/main/packages/camera/camera_android_camerax issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22 -version: 0.6.9+1 +version: 0.6.9+2 environment: sdk: ^3.5.0 diff --git a/packages/espresso/CHANGELOG.md b/packages/espresso/CHANGELOG.md index 0f95ac505d39..aedffb8547c1 100644 --- a/packages/espresso/CHANGELOG.md +++ b/packages/espresso/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.4.0+3 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 0.4.0+2 * Bumps `com.google.guava:guava` from `31.1` to `33.3.1`. diff --git a/packages/espresso/android/build.gradle b/packages/espresso/android/build.gradle index 33eebfa7b73c..9f54c535f0af 100644 --- a/packages/espresso/android/build.gradle +++ b/packages/espresso/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'com.example.espresso' - } + namespace 'com.example.espresso' compileSdk 34 defaultConfig { @@ -34,8 +31,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lintOptions { diff --git a/packages/espresso/example/pubspec.yaml b/packages/espresso/example/pubspec.yaml index 1cafae5d3e18..c39450e9ed83 100644 --- a/packages/espresso/example/pubspec.yaml +++ b/packages/espresso/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the espresso plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/espresso/pubspec.yaml b/packages/espresso/pubspec.yaml index 871d4cd7a55e..57e25352ea96 100644 --- a/packages/espresso/pubspec.yaml +++ b/packages/espresso/pubspec.yaml @@ -3,11 +3,11 @@ description: Java classes for testing Flutter apps using Espresso. Allows driving Flutter widgets from a native Espresso test. repository: https://github.com/flutter/packages/tree/main/packages/espresso issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+espresso%22 -version: 0.4.0+2 +version: 0.4.0+3 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle b/packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle index 497c231a3aba..03fe48c2210b 100644 --- a/packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle +++ b/packages/extension_google_sign_in_as_googleapis_auth/example/android/app/build.gradle @@ -29,8 +29,8 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/file_selector/file_selector/example/android/app/build.gradle b/packages/file_selector/file_selector/example/android/app/build.gradle index bac5035778be..94926c2cedb8 100644 --- a/packages/file_selector/file_selector/example/android/app/build.gradle +++ b/packages/file_selector/file_selector/example/android/app/build.gradle @@ -31,12 +31,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/file_selector/file_selector_android/CHANGELOG.md b/packages/file_selector/file_selector_android/CHANGELOG.md index f225a7c0a8a8..5117a91fa786 100644 --- a/packages/file_selector/file_selector_android/CHANGELOG.md +++ b/packages/file_selector/file_selector_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.5.1+9 + +* Updates Java compatibility version to 11. + ## 0.5.1+8 * Updates Pigeon for non-nullable collection type support. diff --git a/packages/file_selector/file_selector_android/android/build.gradle b/packages/file_selector/file_selector_android/android/build.gradle index c395158facc9..59682ba6ada9 100644 --- a/packages/file_selector/file_selector_android/android/build.gradle +++ b/packages/file_selector/file_selector_android/android/build.gradle @@ -22,15 +22,12 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'dev.flutter.packages.file_selector_android' - } + namespace 'dev.flutter.packages.file_selector_android' compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/file_selector/file_selector_android/example/android/app/build.gradle b/packages/file_selector/file_selector_android/example/android/app/build.gradle index 5af7cb8660db..c6e428a2de13 100644 --- a/packages/file_selector/file_selector_android/example/android/app/build.gradle +++ b/packages/file_selector/file_selector_android/example/android/app/build.gradle @@ -31,8 +31,8 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/file_selector/file_selector_android/pubspec.yaml b/packages/file_selector/file_selector_android/pubspec.yaml index 00059e1ca3ad..e439bc266b16 100644 --- a/packages/file_selector/file_selector_android/pubspec.yaml +++ b/packages/file_selector/file_selector_android/pubspec.yaml @@ -2,7 +2,7 @@ name: file_selector_android description: Android implementation of the file_selector package. repository: https://github.com/flutter/packages/tree/main/packages/file_selector/file_selector_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+file_selector%22 -version: 0.5.1+8 +version: 0.5.1+9 environment: sdk: ^3.5.0 diff --git a/packages/flutter_adaptive_scaffold/example/android/app/build.gradle b/packages/flutter_adaptive_scaffold/example/android/app/build.gradle index 9d27f54fdcb2..ac4a5d1ca358 100644 --- a/packages/flutter_adaptive_scaffold/example/android/app/build.gradle +++ b/packages/flutter_adaptive_scaffold/example/android/app/build.gradle @@ -30,12 +30,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/flutter_image/example/android/app/build.gradle b/packages/flutter_image/example/android/app/build.gradle index dc2df2c455ef..c6be519fd577 100644 --- a/packages/flutter_image/example/android/app/build.gradle +++ b/packages/flutter_image/example/android/app/build.gradle @@ -31,12 +31,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/flutter_plugin_android_lifecycle/CHANGELOG.md b/packages/flutter_plugin_android_lifecycle/CHANGELOG.md index aec197ddc233..f9c8ebd2d9c8 100644 --- a/packages/flutter_plugin_android_lifecycle/CHANGELOG.md +++ b/packages/flutter_plugin_android_lifecycle/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.23 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 2.0.22 * Bumps `com.android.tools.build:gradle` from 7.2.1 to 8.5.1. diff --git a/packages/flutter_plugin_android_lifecycle/android/build.gradle b/packages/flutter_plugin_android_lifecycle/android/build.gradle index db628b0ba8ba..6f897eed0f51 100644 --- a/packages/flutter_plugin_android_lifecycle/android/build.gradle +++ b/packages/flutter_plugin_android_lifecycle/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.flutter_plugin_android_lifecycle' - } + namespace 'io.flutter.plugins.flutter_plugin_android_lifecycle' compileSdk 34 defaultConfig { @@ -35,8 +32,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lintOptions { diff --git a/packages/flutter_plugin_android_lifecycle/example/pubspec.yaml b/packages/flutter_plugin_android_lifecycle/example/pubspec.yaml index 98ca0aebd4dc..82c37c6e77c1 100644 --- a/packages/flutter_plugin_android_lifecycle/example/pubspec.yaml +++ b/packages/flutter_plugin_android_lifecycle/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the flutter_plugin_android_lifecycle plugin publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/flutter_plugin_android_lifecycle/pubspec.yaml b/packages/flutter_plugin_android_lifecycle/pubspec.yaml index 15cae9679fb2..0e8bb6653a43 100644 --- a/packages/flutter_plugin_android_lifecycle/pubspec.yaml +++ b/packages/flutter_plugin_android_lifecycle/pubspec.yaml @@ -2,11 +2,11 @@ name: flutter_plugin_android_lifecycle description: Flutter plugin for accessing an Android Lifecycle within other plugins. repository: https://github.com/flutter/packages/tree/main/packages/flutter_plugin_android_lifecycle issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+flutter_plugin_android_lifecycle%22 -version: 2.0.22 +version: 2.0.23 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/go_router/example/android/app/build.gradle b/packages/go_router/example/android/app/build.gradle index 5ea125183af6..6453592dd8ba 100644 --- a/packages/go_router/example/android/app/build.gradle +++ b/packages/go_router/example/android/app/build.gradle @@ -29,12 +29,12 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md index 0dec52337777..0731f6f7e5a1 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md +++ b/packages/google_maps_flutter/google_maps_flutter_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.14.8 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 2.14.7 * Adds `PlatformPatternItem` pigeon class to convert `PlatformPolyline.pattern`. diff --git a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle index bdc23f5aa794..cdffabbbd4fd 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle +++ b/packages/google_maps_flutter/google_maps_flutter_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.googlemaps' - } + namespace 'io.flutter.plugins.googlemaps' compileSdk 34 defaultConfig { @@ -52,8 +49,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } testOptions { diff --git a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml index df183cfe2ac6..4aac17d849b7 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the google_maps_flutter plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: cupertino_icons: ^1.0.5 diff --git a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml index 8232903259fa..f44ad69f18de 100644 --- a/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml +++ b/packages/google_maps_flutter/google_maps_flutter_android/pubspec.yaml @@ -2,11 +2,11 @@ name: google_maps_flutter_android description: Android implementation of the google_maps_flutter plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_maps_flutter/google_maps_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+maps%22 -version: 2.14.7 +version: 2.14.8 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/google_sign_in/google_sign_in_android/CHANGELOG.md b/packages/google_sign_in/google_sign_in_android/CHANGELOG.md index 29eed92b1abf..2e30337e7764 100644 --- a/packages/google_sign_in/google_sign_in_android/CHANGELOG.md +++ b/packages/google_sign_in/google_sign_in_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 6.1.32 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 6.1.31 * Bumps `com.google.guava:guava` from `32.0.1` to `33.3.1`. diff --git a/packages/google_sign_in/google_sign_in_android/android/build.gradle b/packages/google_sign_in/google_sign_in_android/android/build.gradle index 8eea7909ac83..11fb6c7a7101 100644 --- a/packages/google_sign_in/google_sign_in_android/android/build.gradle +++ b/packages/google_sign_in/google_sign_in_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.googlesignin' - } + namespace 'io.flutter.plugins.googlesignin' compileSdk 34 defaultConfig { @@ -34,8 +31,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lintOptions { diff --git a/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml b/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml index 5d96707b4082..0adb6d9f80fc 100644 --- a/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Example of Google Sign-In plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/google_sign_in/google_sign_in_android/pubspec.yaml b/packages/google_sign_in/google_sign_in_android/pubspec.yaml index 1fbc4f3795bf..86a96c70db4a 100644 --- a/packages/google_sign_in/google_sign_in_android/pubspec.yaml +++ b/packages/google_sign_in/google_sign_in_android/pubspec.yaml @@ -2,11 +2,11 @@ name: google_sign_in_android description: Android implementation of the google_sign_in plugin. repository: https://github.com/flutter/packages/tree/main/packages/google_sign_in/google_sign_in_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+google_sign_in%22 -version: 6.1.31 +version: 6.1.32 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/image_picker/image_picker_android/CHANGELOG.md b/packages/image_picker/image_picker_android/CHANGELOG.md index 139f3e481a2f..22f9afdccd5d 100644 --- a/packages/image_picker/image_picker_android/CHANGELOG.md +++ b/packages/image_picker/image_picker_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.8.12+15 + +* Updates Java compatibility version to 11. + ## 0.8.12+14 * Bumps androidx.activity:activity from 1.9.1 to 1.9.2. diff --git a/packages/image_picker/image_picker_android/android/build.gradle b/packages/image_picker/image_picker_android/android/build.gradle index f4acbe3086b5..729ff82d46fd 100644 --- a/packages/image_picker/image_picker_android/android/build.gradle +++ b/packages/image_picker/image_picker_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.imagepicker' - } + namespace 'io.flutter.plugins.imagepicker' compileSdk 34 defaultConfig { @@ -50,8 +47,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } testOptions { diff --git a/packages/image_picker/image_picker_android/pubspec.yaml b/packages/image_picker/image_picker_android/pubspec.yaml index ab1cfd2470ba..2fe67e1fc8fb 100755 --- a/packages/image_picker/image_picker_android/pubspec.yaml +++ b/packages/image_picker/image_picker_android/pubspec.yaml @@ -2,7 +2,7 @@ name: image_picker_android description: Android implementation of the image_picker plugin. repository: https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+image_picker%22 -version: 0.8.12+14 +version: 0.8.12+15 environment: sdk: ^3.5.0 diff --git a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md index fd5167e8702c..4106f78a504e 100644 --- a/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md +++ b/packages/in_app_purchase/in_app_purchase_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.3.6+9 + +* Updates Java compatibility version to 11. + ## 0.3.6+8 * Removes dependency on org.jetbrains.kotlin:kotlin-bom. diff --git a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle index 87cb5dbe0f19..202915228446 100644 --- a/packages/in_app_purchase/in_app_purchase_android/android/build.gradle +++ b/packages/in_app_purchase/in_app_purchase_android/android/build.gradle @@ -26,10 +26,7 @@ android { buildConfig true } - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.inapppurchase' - } + namespace 'io.flutter.plugins.inapppurchase' compileSdk 34 @@ -43,8 +40,8 @@ android { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } diff --git a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml index f5fbddd81185..b5db8e734128 100644 --- a/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml +++ b/packages/in_app_purchase/in_app_purchase_android/pubspec.yaml @@ -2,7 +2,7 @@ name: in_app_purchase_android description: An implementation for the Android platform of the Flutter `in_app_purchase` plugin. This uses the Android BillingClient APIs. repository: https://github.com/flutter/packages/tree/main/packages/in_app_purchase/in_app_purchase_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 0.3.6+8 +version: 0.3.6+9 environment: sdk: ^3.5.0 diff --git a/packages/interactive_media_ads/CHANGELOG.md b/packages/interactive_media_ads/CHANGELOG.md index 6f019c2ea4eb..5eabc0cf5580 100644 --- a/packages/interactive_media_ads/CHANGELOG.md +++ b/packages/interactive_media_ads/CHANGELOG.md @@ -1,3 +1,8 @@ +## 0.2.2+7 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 0.2.2+6 * Bumps Android dependency `com.google.ads.interactivemedia.v3:interactivemedia` from `3.50.0` to diff --git a/packages/interactive_media_ads/android/build.gradle b/packages/interactive_media_ads/android/build.gradle index 686e1b2a4308..9c57c1ff7cec 100644 --- a/packages/interactive_media_ads/android/build.gradle +++ b/packages/interactive_media_ads/android/build.gradle @@ -25,19 +25,17 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - if (project.android.hasProperty("namespace")) { - namespace 'dev.flutter.packages.interactive_media_ads' - } + namespace 'dev.flutter.packages.interactive_media_ads' compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt b/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt index 3673edaa8d35..a9b616f8e184 100644 --- a/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt +++ b/packages/interactive_media_ads/android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt @@ -21,7 +21,7 @@ class AdsRequestProxyApi(override val pigeonRegistrar: ProxyApiRegistrar) : * * This must match the version in pubspec.yaml. */ - const val pluginVersion = "0.2.2+6" + const val pluginVersion = "0.2.2+7" } override fun setAdTagUrl(pigeon_instance: AdsRequest, adTagUrl: String) { diff --git a/packages/interactive_media_ads/example/android/app/build.gradle b/packages/interactive_media_ads/example/android/app/build.gradle index f3018aafa7a5..97e8ae9a06dc 100644 --- a/packages/interactive_media_ads/example/android/app/build.gradle +++ b/packages/interactive_media_ads/example/android/app/build.gradle @@ -28,12 +28,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift b/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift index e90bd7435420..e24f32c4d9b2 100644 --- a/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift +++ b/packages/interactive_media_ads/ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift @@ -13,7 +13,7 @@ class AdsRequestProxyAPIDelegate: PigeonApiDelegateIMAAdsRequest { /// The current version of the `interactive_media_ads` plugin. /// /// This must match the version in pubspec.yaml. - static let pluginVersion = "0.2.2+6" + static let pluginVersion = "0.2.2+7" func pigeonDefaultConstructor( pigeonApi: PigeonApiIMAAdsRequest, adTagUrl: String, adDisplayContainer: IMAAdDisplayContainer, diff --git a/packages/interactive_media_ads/pubspec.yaml b/packages/interactive_media_ads/pubspec.yaml index ac7b8cf74074..8e804b0647ce 100644 --- a/packages/interactive_media_ads/pubspec.yaml +++ b/packages/interactive_media_ads/pubspec.yaml @@ -2,7 +2,7 @@ name: interactive_media_ads description: A Flutter plugin for using the Interactive Media Ads SDKs on Android and iOS. repository: https://github.com/flutter/packages/tree/main/packages/interactive_media_ads issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+interactive_media_ads%22 -version: 0.2.2+6 # This must match the version in +version: 0.2.2+7 # This must match the version in # `android/src/main/kotlin/dev/flutter/packages/interactive_media_ads/AdsRequestProxyApi.kt` and # `ios/interactive_media_ads/Sources/interactive_media_ads/AdsRequestProxyAPIDelegate.swift` diff --git a/packages/local_auth/local_auth_android/CHANGELOG.md b/packages/local_auth/local_auth_android/CHANGELOG.md index 9ba84a4d4a7a..b5bc8bc9545a 100644 --- a/packages/local_auth/local_auth_android/CHANGELOG.md +++ b/packages/local_auth/local_auth_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.46 + +* Updates Java compatibility version to 11. + ## 1.0.45 * Updates to the latest version of Pigeon. diff --git a/packages/local_auth/local_auth_android/android/build.gradle b/packages/local_auth/local_auth_android/android/build.gradle index 2340ba8ee23c..38acc695fae9 100644 --- a/packages/local_auth/local_auth_android/android/build.gradle +++ b/packages/local_auth/local_auth_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.localauth' - } + namespace 'io.flutter.plugins.localauth' compileSdk 34 defaultConfig { @@ -34,8 +31,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lintOptions { diff --git a/packages/local_auth/local_auth_android/pubspec.yaml b/packages/local_auth/local_auth_android/pubspec.yaml index fb3b255692eb..b75c2440797e 100644 --- a/packages/local_auth/local_auth_android/pubspec.yaml +++ b/packages/local_auth/local_auth_android/pubspec.yaml @@ -2,7 +2,7 @@ name: local_auth_android description: Android implementation of the local_auth plugin. repository: https://github.com/flutter/packages/tree/main/packages/local_auth/local_auth_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+local_auth%22 -version: 1.0.45 +version: 1.0.46 environment: sdk: ^3.5.0 diff --git a/packages/path_provider/path_provider_android/CHANGELOG.md b/packages/path_provider/path_provider_android/CHANGELOG.md index 8d813e49dec8..2cf63ff365f2 100644 --- a/packages/path_provider/path_provider_android/CHANGELOG.md +++ b/packages/path_provider/path_provider_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.2.11 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 2.2.10 * Updates annotations lib to 1.8.2. diff --git a/packages/path_provider/path_provider_android/android/build.gradle b/packages/path_provider/path_provider_android/android/build.gradle index 46d8e053b48a..b21cad02e4cd 100644 --- a/packages/path_provider/path_provider_android/android/build.gradle +++ b/packages/path_provider/path_provider_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.pathprovider' - } + namespace 'io.flutter.plugins.pathprovider' compileSdk 34 defaultConfig { @@ -38,8 +35,8 @@ android { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } diff --git a/packages/path_provider/path_provider_android/example/pubspec.yaml b/packages/path_provider/path_provider_android/example/pubspec.yaml index 54601fb67d72..417f34b0efd9 100644 --- a/packages/path_provider/path_provider_android/example/pubspec.yaml +++ b/packages/path_provider/path_provider_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the path_provider plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/path_provider/path_provider_android/pubspec.yaml b/packages/path_provider/path_provider_android/pubspec.yaml index 5d3e7e398141..0319c8dd5dfb 100644 --- a/packages/path_provider/path_provider_android/pubspec.yaml +++ b/packages/path_provider/path_provider_android/pubspec.yaml @@ -2,11 +2,11 @@ name: path_provider_android description: Android implementation of the path_provider plugin. repository: https://github.com/flutter/packages/tree/main/packages/path_provider/path_provider_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+path_provider%22 -version: 2.2.10 +version: 2.2.11 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/pigeon/example/app/android/app/build.gradle b/packages/pigeon/example/app/android/app/build.gradle index 0877433025ad..f898ecae685a 100644 --- a/packages/pigeon/example/app/android/app/build.gradle +++ b/packages/pigeon/example/app/android/app/build.gradle @@ -31,12 +31,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle index 3c2e835e5ac5..099568e3c98e 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/android/build.gradle @@ -22,15 +22,12 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'com.example.alternate_language_test_plugin' - } + namespace 'com.example.alternate_language_test_plugin' compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app/build.gradle b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app/build.gradle index aecfb56abf70..21beeb8a7042 100644 --- a/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app/build.gradle +++ b/packages/pigeon/platform_tests/alternate_language_test_plugin/example/android/app/build.gradle @@ -31,8 +31,8 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/pigeon/platform_tests/test_plugin/android/build.gradle b/packages/pigeon/platform_tests/test_plugin/android/build.gradle index 51b83c6752bc..2ed864258e26 100644 --- a/packages/pigeon/platform_tests/test_plugin/android/build.gradle +++ b/packages/pigeon/platform_tests/test_plugin/android/build.gradle @@ -25,19 +25,16 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'com.example.test_plugin' - } + namespace 'com.example.test_plugin' compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' allWarningsAsErrors = true } diff --git a/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle b/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle index 92b34cf1b3e7..9f40fc4d2323 100644 --- a/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle +++ b/packages/pigeon/platform_tests/test_plugin/example/android/app/build.gradle @@ -31,12 +31,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/quick_actions/quick_actions_android/CHANGELOG.md b/packages/quick_actions/quick_actions_android/CHANGELOG.md index 3350b35e862c..4ea1b250ffbe 100644 --- a/packages/quick_actions/quick_actions_android/CHANGELOG.md +++ b/packages/quick_actions/quick_actions_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.0.18 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 1.0.17 * Updates README to include more specific context on how to use launcher activities, including diff --git a/packages/quick_actions/quick_actions_android/android/build.gradle b/packages/quick_actions/quick_actions_android/android/build.gradle index 985f63590bcf..2fbf82af56c2 100644 --- a/packages/quick_actions/quick_actions_android/android/build.gradle +++ b/packages/quick_actions/quick_actions_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.quickactions' - } + namespace 'io.flutter.plugins.quickactions' compileSdk 34 defaultConfig { @@ -44,8 +41,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } testOptions { diff --git a/packages/quick_actions/quick_actions_android/example/pubspec.yaml b/packages/quick_actions/quick_actions_android/example/pubspec.yaml index 18511d536148..eb2f86ab62ca 100644 --- a/packages/quick_actions/quick_actions_android/example/pubspec.yaml +++ b/packages/quick_actions/quick_actions_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the quick_actions plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/quick_actions/quick_actions_android/pubspec.yaml b/packages/quick_actions/quick_actions_android/pubspec.yaml index 794c5f830823..cf6cb0fbb5ce 100644 --- a/packages/quick_actions/quick_actions_android/pubspec.yaml +++ b/packages/quick_actions/quick_actions_android/pubspec.yaml @@ -2,11 +2,11 @@ name: quick_actions_android description: An implementation for the Android platform of the Flutter `quick_actions` plugin. repository: https://github.com/flutter/packages/tree/main/packages/quick_actions/quick_actions_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+in_app_purchase%22 -version: 1.0.17 +version: 1.0.18 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/rfw/example/hello/android/app/build.gradle b/packages/rfw/example/hello/android/app/build.gradle index 100a64244e12..5f291d55b6b2 100644 --- a/packages/rfw/example/hello/android/app/build.gradle +++ b/packages/rfw/example/hello/android/app/build.gradle @@ -30,12 +30,12 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/rfw/example/local/android/app/build.gradle b/packages/rfw/example/local/android/app/build.gradle index 5bbaeffa4b31..0482ab4b404f 100644 --- a/packages/rfw/example/local/android/app/build.gradle +++ b/packages/rfw/example/local/android/app/build.gradle @@ -30,12 +30,12 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/rfw/example/remote/android/app/build.gradle b/packages/rfw/example/remote/android/app/build.gradle index 8ece05d61c0c..c0ae2d992f75 100644 --- a/packages/rfw/example/remote/android/app/build.gradle +++ b/packages/rfw/example/remote/android/app/build.gradle @@ -30,12 +30,12 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/shared_preferences/shared_preferences_android/CHANGELOG.md b/packages/shared_preferences/shared_preferences_android/CHANGELOG.md index 0dfd2204031d..8061930e0310 100644 --- a/packages/shared_preferences/shared_preferences_android/CHANGELOG.md +++ b/packages/shared_preferences/shared_preferences_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.3.3 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 2.3.2 * Bumps `com.android.tools.build:gradle` from 7.2.2 to 8.5.1. diff --git a/packages/shared_preferences/shared_preferences_android/android/build.gradle b/packages/shared_preferences/shared_preferences_android/android/build.gradle index 589ad7411735..05eab6f253fb 100644 --- a/packages/shared_preferences/shared_preferences_android/android/build.gradle +++ b/packages/shared_preferences/shared_preferences_android/android/build.gradle @@ -33,19 +33,16 @@ apply plugin: 'com.android.library' apply plugin: 'kotlin-android' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.sharedpreferences' - } + namespace 'io.flutter.plugins.sharedpreferences' compileSdk 34 compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/shared_preferences/shared_preferences_android/example/pubspec.yaml b/packages/shared_preferences/shared_preferences_android/example/pubspec.yaml index 632f949762f2..5e40089c153a 100644 --- a/packages/shared_preferences/shared_preferences_android/example/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the shared_preferences plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/shared_preferences/shared_preferences_android/pubspec.yaml b/packages/shared_preferences/shared_preferences_android/pubspec.yaml index 80c9466ab063..d874a9b8b676 100644 --- a/packages/shared_preferences/shared_preferences_android/pubspec.yaml +++ b/packages/shared_preferences/shared_preferences_android/pubspec.yaml @@ -2,11 +2,11 @@ name: shared_preferences_android description: Android implementation of the shared_preferences plugin repository: https://github.com/flutter/packages/tree/main/packages/shared_preferences/shared_preferences_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+shared_preferences%22 -version: 2.3.2 +version: 2.3.3 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/packages/two_dimensional_scrollables/example/android/app/build.gradle b/packages/two_dimensional_scrollables/example/android/app/build.gradle index 6648ebb4f24c..959671515102 100644 --- a/packages/two_dimensional_scrollables/example/android/app/build.gradle +++ b/packages/two_dimensional_scrollables/example/android/app/build.gradle @@ -31,12 +31,12 @@ android { ndkVersion flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = '11' } sourceSets { diff --git a/packages/url_launcher/url_launcher_android/CHANGELOG.md b/packages/url_launcher/url_launcher_android/CHANGELOG.md index 194b42a7d99d..3ab3f0e892e4 100644 --- a/packages/url_launcher/url_launcher_android/CHANGELOG.md +++ b/packages/url_launcher/url_launcher_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 6.3.12 + +* Updates Java compatibility version to 11. + ## 6.3.11 * Updates Pigeon for non-nullable collection type support. diff --git a/packages/url_launcher/url_launcher_android/android/build.gradle b/packages/url_launcher/url_launcher_android/android/build.gradle index 2fc5a7a47a32..c874093d4487 100644 --- a/packages/url_launcher/url_launcher_android/android/build.gradle +++ b/packages/url_launcher/url_launcher_android/android/build.gradle @@ -25,10 +25,7 @@ android { buildFeatures { buildConfig true } - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.urllauncher' - } + namespace 'io.flutter.plugins.urllauncher' compileSdk 34 defaultConfig { @@ -37,8 +34,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } lintOptions { diff --git a/packages/url_launcher/url_launcher_android/pubspec.yaml b/packages/url_launcher/url_launcher_android/pubspec.yaml index dd1db8da802e..7313168e669c 100644 --- a/packages/url_launcher/url_launcher_android/pubspec.yaml +++ b/packages/url_launcher/url_launcher_android/pubspec.yaml @@ -2,7 +2,7 @@ name: url_launcher_android description: Android implementation of the url_launcher plugin. repository: https://github.com/flutter/packages/tree/main/packages/url_launcher/url_launcher_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+url_launcher%22 -version: 6.3.11 +version: 6.3.12 environment: sdk: ^3.5.0 flutter: ">=3.24.0" diff --git a/packages/video_player/video_player/example/android/app/build.gradle b/packages/video_player/video_player/example/android/app/build.gradle index 097935b6b0bf..445511215d63 100644 --- a/packages/video_player/video_player/example/android/app/build.gradle +++ b/packages/video_player/video_player/example/android/app/build.gradle @@ -29,8 +29,8 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/video_player/video_player_android/CHANGELOG.md b/packages/video_player/video_player_android/CHANGELOG.md index bf5b03414fa2..053247bf09f2 100644 --- a/packages/video_player/video_player_android/CHANGELOG.md +++ b/packages/video_player/video_player_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.7.9 + +* Updates Java compatibility version to 11. + ## 2.7.8 * Updates Pigeon for non-nullable collection type support. diff --git a/packages/video_player/video_player_android/android/build.gradle b/packages/video_player/video_player_android/android/build.gradle index 282b6144b442..5cadcf23b43e 100644 --- a/packages/video_player/video_player_android/android/build.gradle +++ b/packages/video_player/video_player_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.videoplayer' - } + namespace 'io.flutter.plugins.videoplayer' compileSdk 34 defaultConfig { @@ -38,8 +35,8 @@ android { disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable' } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } dependencies { diff --git a/packages/video_player/video_player_android/example/android/app/build.gradle b/packages/video_player/video_player_android/example/android/app/build.gradle index 9399190e1242..09fef69716d4 100644 --- a/packages/video_player/video_player_android/example/android/app/build.gradle +++ b/packages/video_player/video_player_android/example/android/app/build.gradle @@ -29,8 +29,8 @@ android { compileSdk flutter.compileSdkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } defaultConfig { diff --git a/packages/video_player/video_player_android/example/pubspec.yaml b/packages/video_player/video_player_android/example/pubspec.yaml index a6c57dc8d8bb..01ce43d2c534 100644 --- a/packages/video_player/video_player_android/example/pubspec.yaml +++ b/packages/video_player/video_player_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the video_player plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/video_player/video_player_android/pubspec.yaml b/packages/video_player/video_player_android/pubspec.yaml index 5a799c1c8d74..46c7db289db8 100644 --- a/packages/video_player/video_player_android/pubspec.yaml +++ b/packages/video_player/video_player_android/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_android description: Android implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.7.8 +version: 2.7.9 environment: sdk: ^3.5.0 diff --git a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md index 03e2991e1e38..6baf3762c445 100644 --- a/packages/webview_flutter/webview_flutter_android/CHANGELOG.md +++ b/packages/webview_flutter/webview_flutter_android/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.16.9 + +* Updates Java compatibility version to 11. +* Updates minimum supported SDK version to Flutter 3.24/Dart 3.5. + ## 3.16.8 * Bumps androidx.webkit:webkit from 1.11.0 to 1.12.0. diff --git a/packages/webview_flutter/webview_flutter_android/android/build.gradle b/packages/webview_flutter/webview_flutter_android/android/build.gradle index b71c3689940a..a0d12facbb3d 100644 --- a/packages/webview_flutter/webview_flutter_android/android/build.gradle +++ b/packages/webview_flutter/webview_flutter_android/android/build.gradle @@ -22,10 +22,7 @@ rootProject.allprojects { apply plugin: 'com.android.library' android { - // Conditional for compatibility with AGP <4.2. - if (project.android.hasProperty("namespace")) { - namespace 'io.flutter.plugins.webviewflutter' - } + namespace 'io.flutter.plugins.webviewflutter' compileSdk 34 defaultConfig { @@ -48,8 +45,8 @@ android { } compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } testOptions { diff --git a/packages/webview_flutter/webview_flutter_android/example/pubspec.yaml b/packages/webview_flutter/webview_flutter_android/example/pubspec.yaml index cee9594f0972..c22d7dc70220 100644 --- a/packages/webview_flutter/webview_flutter_android/example/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_android/example/pubspec.yaml @@ -3,8 +3,8 @@ description: Demonstrates how to use the webview_flutter_android plugin. publish_to: none environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" dependencies: flutter: diff --git a/packages/webview_flutter/webview_flutter_android/pubspec.yaml b/packages/webview_flutter/webview_flutter_android/pubspec.yaml index 6a3ab45b9734..103d7f640d67 100644 --- a/packages/webview_flutter/webview_flutter_android/pubspec.yaml +++ b/packages/webview_flutter/webview_flutter_android/pubspec.yaml @@ -2,11 +2,11 @@ name: webview_flutter_android description: A Flutter plugin that provides a WebView widget on Android. repository: https://github.com/flutter/packages/tree/main/packages/webview_flutter/webview_flutter_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+webview%22 -version: 3.16.8 +version: 3.16.9 environment: - sdk: ^3.4.0 - flutter: ">=3.22.0" + sdk: ^3.5.0 + flutter: ">=3.24.0" flutter: plugin: diff --git a/script/tool/lib/src/gradle_check_command.dart b/script/tool/lib/src/gradle_check_command.dart index 38977d91c984..a4657560d3f4 100644 --- a/script/tool/lib/src/gradle_check_command.dart +++ b/script/tool/lib/src/gradle_check_command.dart @@ -298,31 +298,13 @@ apply plugin: "com.google.cloud.artifactregistry.gradle-plugin" final RegExpMatch? namespaceMatch = namespaceRegex.firstMatch(gradleContents); - // For plugins, make sure the namespace is conditionalized so that it - // doesn't break client apps using AGP 4.1 and earlier (which don't have - // a namespace property, and will fail to build if it's set). - const String namespaceConditional = - 'if (project.android.hasProperty("namespace"))'; - String exampleSetNamespace = "namespace 'dev.flutter.foo'"; - if (!isExample) { - exampleSetNamespace = ''' -$namespaceConditional { - $exampleSetNamespace -}'''; - } - // Wrap the namespace command in an `android` block, adding the indentation - // to make it line up correctly. - final String exampleAndroidNamespaceBlock = ''' - android { - ${exampleSetNamespace.split('\n').join('\n ')} - } -'''; - if (namespaceMatch == null) { - final String errorMessage = ''' + const String errorMessage = ''' build.gradle must set a "namespace": -$exampleAndroidNamespaceBlock + android { + namespace 'dev.flutter.foo' + } The value must match the "package" attribute in AndroidManifest.xml, if one is present. For more information, see: @@ -333,18 +315,6 @@ https://developer.android.com/build/publish-library/prep-lib-release#choose-name '$indentation${errorMessage.split('\n').join('\n$indentation')}'); return false; } else { - if (!isExample && !gradleContents.contains(namespaceConditional)) { - final String errorMessage = ''' -build.gradle for a plugin must conditionalize "namespace": - -$exampleAndroidNamespaceBlock -'''; - - printError( - '$indentation${errorMessage.split('\n').join('\n$indentation')}'); - return false; - } - return _validateNamespaceMatchesManifest(package, isExample: isExample, namespace: namespaceMatch.group(1)!); } @@ -398,15 +368,15 @@ build.gradle must set an explicit Java compatibility version. This can be done either via "sourceCompatibility"/"targetCompatibility": android { compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility JavaVersion.VERSION_11 + targetCompatibility JavaVersion.VERSION_11 } } or "toolchain": java { toolchain { - languageVersion = JavaLanguageVersion.of(8) + languageVersion = JavaLanguageVersion.of(11) } } diff --git a/script/tool/test/gradle_check_command_test.dart b/script/tool/test/gradle_check_command_test.dart index 0e6c78ff1fe4..11376e063dc1 100644 --- a/script/tool/test/gradle_check_command_test.dart +++ b/script/tool/test/gradle_check_command_test.dart @@ -41,7 +41,6 @@ void main() { bool includeTargetCompat = false, bool commentSourceLanguage = false, bool includeNamespace = true, - bool conditionalizeNamespace = true, bool commentNamespace = false, bool warningsConfigured = true, }) { @@ -67,18 +66,11 @@ java { '''; final String sourceCompat = - '${commentSourceLanguage ? '// ' : ''}sourceCompatibility JavaVersion.VERSION_1_8'; + '${commentSourceLanguage ? '// ' : ''}sourceCompatibility JavaVersion.VERSION_11'; final String targetCompat = - '${commentSourceLanguage ? '// ' : ''}targetCompatibility JavaVersion.VERSION_1_8'; - String namespace = + '${commentSourceLanguage ? '// ' : ''}targetCompatibility JavaVersion.VERSION_11'; + final String namespace = " ${commentNamespace ? '// ' : ''}namespace '$_defaultFakeNamespace'"; - if (conditionalizeNamespace) { - namespace = ''' - if (project.android.hasProperty("namespace")) { - $namespace - } -'''; - } buildGradle.writeAsStringSync(''' group 'dev.flutter.plugins.fake' @@ -490,28 +482,6 @@ dependencies { ); }); - test('fails when plugin namespace is not conditional', () async { - final RepositoryPackage package = - createFakePlugin('a_plugin', packagesDir, examples: []); - writeFakePluginBuildGradle(package, - includeLanguageVersion: true, conditionalizeNamespace: false); - writeFakeManifest(package); - - Error? commandError; - final List output = await runCapturingPrint( - runner, ['gradle-check'], errorHandler: (Error e) { - commandError = e; - }); - - expect(commandError, isA()); - expect( - output, - containsAllInOrder([ - contains('build.gradle for a plugin must conditionalize "namespace"'), - ]), - ); - }); - test('fails when namespace is missing', () async { final RepositoryPackage package = createFakePlugin('a_plugin', packagesDir, examples: []);