Skip to content

[AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin#11806

Merged
auto-submit[bot] merged 7 commits into
flutter:mainfrom
jesswrd:migrate-remaining-example-apps-bk
Jun 9, 2026
Merged

[AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin#11806
auto-submit[bot] merged 7 commits into
flutter:mainfrom
jesswrd:migrate-remaining-example-apps-bk

Conversation

@jesswrd

@jesswrd jesswrd commented May 30, 2026

Copy link
Copy Markdown
Contributor

Migrate remaining example apps to built-in kotlin. Refactored validation checks for kotlin configs and added unit tests for example apps. Now both plugin modules and plugin example apps have checks for kotlin configs (includes built-in kotlin configs).

Fixes flutter/flutter#187325

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 2, 2026
@jesswrd jesswrd changed the title [AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin [WIP] [AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin Jun 2, 2026
@jesswrd jesswrd added the CICD Run CI/CD label Jun 2, 2026
@jesswrd jesswrd changed the title [WIP] [AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin [AGP 9] Migrate Remaining Plugin Example Apps to Built-in Kotlin Jun 2, 2026
@jesswrd jesswrd marked this pull request as ready for review June 2, 2026 17:07
@jesswrd jesswrd requested a review from stuartmorgan-g June 2, 2026 17:07

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates multiple example Android applications and validation tests to upgrade Gradle to 9.1.0, the Android Gradle Plugin to 9.0.1, and Kotlin to 2.3.20. It removes the kotlin-android plugin and migrates kotlinOptions to the new kotlin compiler options block targeting JVM 17. Feedback across several files indicates that setting android.builtInKotlin and android.newDsl to false in gradle.properties will cause build failures since the kotlin-android plugin was removed. These flags should be updated to true to enable built-in Kotlin support.

Comment thread packages/animations/example/android/gradle.properties
Comment thread packages/camera/camera/example/android/gradle.properties
Comment thread packages/go_router/example/android/gradle.properties
Comment on lines +4 to +7
# This builtInKotlin flag was added automatically by Flutter migrator
android.builtInKotlin=false
# This newDsl flag was added automatically by Flutter migrator
android.newDsl=false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.

Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.

Please update this flag to true across all gradle.properties files 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

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

Since the goal of this pull request is to migrate the example apps to built-in Kotlin and the new DSL, these flags should be set to true. Setting them to false disables the built-in Kotlin support.

Furthermore, because kotlin-android was removed from build.gradle.kts, having android.builtInKotlin=false will cause Gradle to fail with an error like Extension with name 'kotlin' does not exist because the Kotlin plugin is never applied.

Please update this flag to true across all gradle.properties files 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

@jesswrd

jesswrd commented Jun 2, 2026

Copy link
Copy Markdown
Contributor Author

@stuartmorgan-g I noticed there aren't really any existing validators for configurations like kotlinOptions{} in example plugin apps. Do you happen to know why? If there isn't an explicit reason for excluding those tests, I'm going to add them.

@stuartmorgan-g

Copy link
Copy Markdown
Collaborator

@stuartmorgan-g I noticed there aren't really any existing validators for configurations like kotlinOptions{} in example plugin apps. Do you happen to know why?

I'm pretty sure I just missed adding some validation when I was doing the Kotlin gradle migrations. As I'm sure you're well aware by now, keeping track of which things are in which variants and which ones have been validated is... nontrivial :)

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 8, 2026
@jesswrd jesswrd added the CICD Run CI/CD label Jun 8, 2026
@flutter-dashboard

Copy link
Copy Markdown

This pull request is not mergeable in its current state, likely because of a merge conflict. Pre-submit CI jobs were not triggered. Pushing a new commit to this branch that resolves the issue will result in pre-submit jobs being scheduled.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 8, 2026
@jesswrd jesswrd added the CICD Run CI/CD label Jun 8, 2026
@jesswrd

jesswrd commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

@stuartmorgan-g I noticed there aren't really any existing validators for configurations like kotlinOptions{} in example plugin apps. Do you happen to know why?

I'm pretty sure I just missed adding some validation when I was doing the Kotlin gradle migrations. As I'm sure you're well aware by now, keeping track of which things are in which variants and which ones have been validated is... nontrivial :)

@stuartmorgan-g Ah, gotcha. I added the same validations to the example app build.gradle(.kts) files. Ready for review now.

@github-actions github-actions Bot removed the CICD Run CI/CD label Jun 9, 2026
@jesswrd jesswrd added the CICD Run CI/CD label Jun 9, 2026

@stuartmorgan-g stuartmorgan-g left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@jesswrd jesswrd added the autosubmit Merge PR when tree becomes green via auto submit App label Jun 9, 2026
@auto-submit auto-submit Bot merged commit bd297cf into flutter:main Jun 9, 2026
87 checks passed
pull Bot pushed a commit to Budda0ne/flutter that referenced this pull request Jun 9, 2026
…r#187739)

flutter/packages@13b49f4...bd297cf

2026-06-09 jessiewong401@gmail.com [AGP 9] Migrate Remaining Plugin
Example Apps to Built-in Kotlin (flutter/packages#11806)
2026-06-09 stuartmorgan@google.com [tool] Check for any Flutter SDK
dependency (flutter/packages#11875)
2026-06-09 22373191+Hari-07@users.noreply.github.com
[google_maps_flutter_ios_sdk9] Fix title in google maps sdk9 readme
(flutter/packages#11826)
2026-06-08 jmccandless@google.com [Decoupling] Repo-wide changes
(flutter/packages#11874)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…tter#11806)

Migrate remaining example apps to built-in kotlin. Refactored validation checks for kotlin configs and added unit tests for example apps. Now both plugin modules and plugin example apps have checks for kotlin configs (includes built-in kotlin configs).

Fixes flutter/flutter#187325
## Pre-Review Checklist

**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
…r#187739)

flutter/packages@13b49f4...bd297cf

2026-06-09 jessiewong401@gmail.com [AGP 9] Migrate Remaining Plugin
Example Apps to Built-in Kotlin (flutter/packages#11806)
2026-06-09 stuartmorgan@google.com [tool] Check for any Flutter SDK
dependency (flutter/packages#11875)
2026-06-09 22373191+Hari-07@users.noreply.github.com
[google_maps_flutter_ios_sdk9] Fix title in google maps sdk9 readme
(flutter/packages#11826)
2026-06-08 jmccandless@google.com [Decoupling] Repo-wide changes
(flutter/packages#11874)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC flutter-ecosystem@google.com on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AGP 9] Migrate All Plugin Example Apps to Built-in Kotlin

2 participants