Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c35e039
migrate all affected plugins
jesswrd May 29, 2026
20f78c1
Merge branch 'main' into migrate-all-plugins-bk
jesswrd May 29, 2026
d65cb14
interactive_media_ads now matches pubpsec version
jesswrd May 29, 2026
59a180d
fixed initialization formal warnings by using modern initializing for…
jesswrd May 29, 2026
00d5cc3
Kotlin 2.3+ treats redundant type conversions as warning. removed the…
jesswrd May 29, 2026
71aff96
updated from a fake nonstadard MIME type to a standard MIME "text/pla…
jesswrd May 29, 2026
457bfab
access to private apis will be removed in a future major android rele…
jesswrd May 29, 2026
fbf1622
apps can no longer access all queried details of all apps. to query o…
jesswrd May 29, 2026
e2971c8
starting gradle 9 there are stricter checks on declaring dependencies
jesswrd May 29, 2026
c41615f
Merge branch 'migrate-all-plugins-bk' of github.com:jesswrd/packages …
jesswrd May 29, 2026
553f8bc
due to dependency upgrades a non-null options is always passed into s…
jesswrd May 29, 2026
18e4079
declared dependency due to stricter enforcement in Gradle 9
jesswrd May 29, 2026
6e2239d
fix repo checks
jesswrd May 29, 2026
8df47bb
error minimum version is 2.0.0. update test accordingly
jesswrd May 29, 2026
8f06407
missed this
jesswrd May 29, 2026
873ca07
Raise minimum Kotlin version constant to 2.0.0 to match test assertions
jesswrd May 29, 2026
1ab4090
added validation for plugin module build.gradle
jesswrd May 29, 2026
59507fd
added test that fails when kotlin compiler options block is in the an…
jesswrd May 29, 2026
4e197fb
Merge branch 'main' into migrate-all-plugins-bk
jesswrd May 30, 2026
6de1f59
fix restriction from sending ACTION_CLOSE_SYSTEM_DIALOGS broadcast to…
jesswrd May 30, 2026
ec62754
fix formatting issue
jesswrd May 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/camera/camera_android_camerax/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.7.2+1

* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
* Migrates to Built-in Kotlin to support AGP 9.
* Updates minimum supported SDK version to Flutter 3.44/Dart 3.12.

## 0.7.2

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.flutter.plugins.camerax"
version = "1.0"

Expand All @@ -25,12 +23,11 @@ allprojects {

plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("dev.flutter.flutter-gradle-plugin")
}

Expand All @@ -14,10 +13,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

defaultConfig {
applicationId = "io.flutter.plugins.cameraxexample"
minSdk = flutter.minSdkVersion
Expand All @@ -34,6 +29,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true

# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
Comment on lines +4 to +7
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since this PR explicitly migrates the plugins and their example apps to use the new Gradle plugins DSL and built-in Kotlin (by removing id("kotlin-android") and updating the Gradle/Kotlin versions), these flags should be set to true.

If android.builtInKotlin is left as false, the Flutter Gradle plugin will not automatically apply Kotlin, and since kotlin-android was removed, Kotlin compilation will fail. Similarly, android.newDsl should be true since the project has been migrated to the new declarative plugins DSL in settings.gradle.kts.

Note: Please apply this change to all other gradle.properties files modified in this PR.

# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=true
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=true

Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pluginManagement {
// See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info.
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "9.0.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1"
}

Expand Down
6 changes: 3 additions & 3 deletions packages/camera/camera_android_camerax/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ 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.7.2
version: 0.7.2+1

environment:
sdk: ^3.10.0
flutter: ">=3.38.0"
sdk: ^3.12.0
flutter: ">=3.44.0"

flutter:
plugin:
Expand Down
5 changes: 3 additions & 2 deletions packages/file_selector/file_selector_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 0.5.2+7

* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
* Migrates to Built-in Kotlin to support AGP 9.
* Updates minimum supported SDK version to Flutter 3.44/Dart 3.12.

## 0.5.2+6

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "dev.flutter.packages.file_selector_android"
version = "1.0"

Expand All @@ -25,12 +23,11 @@ allprojects {

plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public void before() {
// present already.
//noinspection deprecation
var mimeTypeMap = shadowOf(MimeTypeMap.getSingleton());
mimeTypeMap.addExtensionMimeTypeMapping("txt", "document/txt");
mimeTypeMap.addExtensionMimeTypeMapping("txt", "text/plain");
mimeTypeMap.addExtensionMimeTypeMapping("jpg", "image/jpeg");
mimeTypeMap.addExtensionMimeTypeMapping("png", "image/png");
mimeTypeMap.addExtensionMimeTypeMapping("webp", "image/webp");
Expand Down Expand Up @@ -225,7 +225,7 @@ public Cursor query(
@Nullable
@Override
public String getType(@NonNull Uri uri) {
if (uri.equals(TXT_URI)) return "document/txt";
if (uri.equals(TXT_URI)) return "text/plain";
if (uri.equals(PNG_URI)) return "image/png";
if (uri.equals(WEBP_URI)) return "image/webp";
if (uri.equals(NO_EXTENSION_URI)) return "image/png";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("dev.flutter.flutter-gradle-plugin")
}

Expand Down Expand Up @@ -30,6 +29,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.content.ClipData;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.view.View;
import androidx.test.core.app.ActivityScenario;
import androidx.test.espresso.flutter.api.WidgetAssertion;
Expand All @@ -39,14 +40,21 @@ public class FileSelectorAndroidTest {
@Rule public IntentsRule intentsRule = new IntentsRule();

public void clearAnySystemDialog() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
return;
}
myActivityTestRule
.getScenario()
.onActivity(
new ActivityScenario.ActivityAction<DriverExtensionActivity>() {
@Override
public void perform(DriverExtensionActivity activity) {
Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
activity.sendBroadcast(closeDialog);
try {
Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
activity.sendBroadcast(closeDialog);
} catch (SecurityException e) {
// Suppress exception on S+ emulator devices.
}
Comment on lines +52 to +57
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Since Build.VERSION.SDK_INT >= Build.VERSION_CODES.S is checked and returns early at the beginning of the method, the try-catch block catching SecurityException is redundant. The restriction on ACTION_CLOSE_SYSTEM_DIALOGS and the resulting SecurityException are only present on Android 12 (S) and above.

                Intent closeDialog = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
                activity.sendBroadcast(closeDialog);

}
});
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true

# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pluginManagement {
// See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info.
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "9.0.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1"
}

Expand Down
6 changes: 3 additions & 3 deletions packages/file_selector/file_selector_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ 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.2+6
version: 0.5.2+7

environment:
sdk: ^3.10.0
flutter: ">=3.38.0"
sdk: ^3.12.0
flutter: ">=3.44.0"

flutter:
plugin:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
## 2.19.11

* Migrates to Built-in Kotlin to support AGP 9.
* Updates minimum supported SDK version to Flutter 3.44/Dart 3.12.

## 2.19.10

* Updates README to include setup information.

## 2.19.9

* Adds attribution ID for Google Maps SDK usage.
* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.

## 2.19.8

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.flutter.plugins.googlemaps"
version = "1.0-SNAPSHOT"

Expand All @@ -25,12 +23,11 @@ allprojects {

plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("com.android.application")
id("kotlin-android")
id("dev.flutter.flutter-gradle-plugin")
}

Expand All @@ -13,10 +12,6 @@ android {
targetCompatibility = JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

defaultConfig {
applicationId = "io.flutter.plugins.googlemapsexample"
minSdk = flutter.minSdkVersion
Expand All @@ -43,6 +38,12 @@ android {
}
}

kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

flutter {
source = "../.."
}
Expand All @@ -55,3 +56,7 @@ dependencies {
testImplementation("com.google.android.gms:play-services-maps:17.0.0")
testImplementation("com.google.maps.android:android-maps-utils:4.0.0")
}

tasks.matching { it.name == "packageDebugUnitTestForUnitTest" }.configureEach {
dependsOn("copyFlutterAssetsDebug")
}
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
org.gradle.jvmargs=-Xmx4G
android.useAndroidX=true

# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-9.1.0-all.zip

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ pluginManagement {
// See https://github.com/flutter/flutter/blob/master/docs/ecosystem/Plugins-and-Packages-repository-structure.md#gradle-structure for more info.
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "8.11.1" apply false
id("org.jetbrains.kotlin.android") version "2.2.20" apply false
id("com.android.application") version "9.0.1" apply false
id("org.jetbrains.kotlin.android") version "2.3.20" apply false
id("com.google.cloud.artifactregistry.gradle-plugin") version "2.2.1"
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.19.10
version: 2.19.11

environment:
sdk: ^3.10.0
flutter: ">=3.38.0"
sdk: ^3.12.0
flutter: ">=3.44.0"

flutter:
plugin:
Expand Down
5 changes: 3 additions & 2 deletions packages/google_sign_in/google_sign_in_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## NEXT
## 7.2.12

* Updates minimum supported SDK version to Flutter 3.38/Dart 3.10.
* Migrates to Built-in Kotlin to support AGP 9.
* Updates minimum supported SDK version to Flutter 3.44/Dart 3.12.

## 7.2.11

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget

group = "io.flutter.plugins.googlesignin"
version = "1.0-SNAPSHOT"

Expand All @@ -25,12 +23,11 @@ allprojects {

plugins {
id("com.android.library")
id("kotlin-android")
}

kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}

Expand Down
Loading
Loading