Skip to content

[various] Convert plugin builds to Kotlin gradle#11172

Merged
auto-submit[bot] merged 37 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-all-plugins
Mar 25, 2026
Merged

[various] Convert plugin builds to Kotlin gradle#11172
auto-submit[bot] merged 37 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-all-plugins

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Following up from #11169, this converts all the rest of the plugins in the repository to use Kotlin rather than Groovy for plugin build files. As with that PR, this does not change the example apps, only the plugin builds themselves.

Part of flutter/flutter#176065

Pre-Review Checklist

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

@stuartmorgan-g stuartmorgan-g marked this pull request as ready for review March 18, 2026 20:33
@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Mar 18, 2026
Copy link
Copy Markdown

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

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 migrates a large number of Android plugin build files from Groovy to Kotlin DSL. The changes are mostly mechanical conversions and appear to be correct, preserving the original build logic. I've found one minor issue where a compiler option was dropped during the conversion in one of the test plugins, which I've commented on.

@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 19, 2026
@stuartmorgan-g stuartmorgan-g added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 19, 2026
Comment on lines -37 to -40
kotlinOptions {
// This must match the Java version provided in compileOptions.
jvmTarget = JavaVersion.VERSION_17.toString()
}
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.

no longer needed?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The kotlin { compilerOptions { ... } } section on line 31 is the newer form of this.

// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// dependency to appear on your APK"s compile classpath or the test APK
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.

this doesn't seem intentional

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Oops, I thought I fixed all of these. My vi record/playback for classpath standardization wasn't quite as precise as intended on the initial pass.

Comment on lines -36 to -39
kotlinOptions {
jvmTarget = JavaVersion.VERSION_17.toString()
}

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.

here also, I saw that it was still in some of the new files

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Same. The new files should all have the new form rather than this.

@stuartmorgan-g stuartmorgan-g removed the autosubmit Merge PR when tree becomes green via auto submit App label Mar 20, 2026
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App and removed CICD Run CI/CD labels Mar 20, 2026
@auto-submit auto-submit bot merged commit ec1ce5b into flutter:main Mar 25, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 25, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 25, 2026
flutter/packages@8dcfd11...5909bdd

2026-03-25 47866232+chunhtai@users.noreply.github.com [ci] add more
permissions for create-pull-request (flutter/packages#11302)
2026-03-25 stuartmorgan@google.com [various] Add
`unintended_html_in_doc_comment` to analysis options
(flutter/packages#11303)
2026-03-25 matt.boetger@gmail.com Use deprecated dependency until legacy
renderer is removed (flutter/packages#11185)
2026-03-25 louisehsu@google.com [in_app_purchase_storekit] Address flaky
tests (flutter/packages#11270)
2026-03-25 stuartmorgan@google.com [google_maps_flutter] Fix A2A iOS
builds (flutter/packages#11290)
2026-03-25 stuartmorgan@google.com [mustache_template] Fix broken README
link (flutter/packages#11306)
2026-03-25 stuartmorgan@google.com [ci] Add a workflow to auto-remove
CICD label (flutter/packages#11301)
2026-03-25 stuartmorgan@google.com [various] Convert plugin builds to
Kotlin gradle (flutter/packages#11172)
2026-03-25 spkhalad@gmail.com [webview_flutter_platform_interface] Add
support for getting cookie (flutter/packages#11037)
2026-03-25 stuartmorgan@google.com [cupertino_icons] Remove empty Dart
file (flutter/packages#11308)
2026-03-25 stuartmorgan@google.com [camera] Regenerate iOS example with
Swift (flutter/packages#11283)
2026-03-25 tarrinneal@gmail.com [pigeon] Optimize data class equality
and hashing in Dart, Kotlin, java, and Swift, adds equality in other
languages (flutter/packages#11140)
2026-03-25 katelovett@google.com [two_dimensional_scrollables] Fix span
border decorations in flipped cross axes (flutter/packages#11334)

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
okorohelijah pushed a commit to okorohelijah/packages that referenced this pull request Mar 26, 2026
As a precursor to converting plugins to use Kotlin Gradle build files in flutter#11172, this does some final standardization of the Groovy versions:
- Uses `"` instead of `'` on more lines.
- Uses `(...)` and `=` in places where it's optional, instead of just a space.
- Uses `minSdk` instead of `minSdkVersion`.
- Standardizes vertical whitespace (not necessary for the conversion, but it's something I cleaned up in that PR).

This is being done as a precursor PR because I noticed that the files are mostly right on the cusp of being similar enough for git to think they are renames with changes rather than deletion and addition; some are ending up one way, and some the other. Since renames with changes make blame much more useful, I'd like to make the files more similar so that hopefully almost all of them will end up as renames with changes in that PR.

## Pre-Review Checklist

[^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.
okorohelijah pushed a commit to okorohelijah/packages that referenced this pull request Mar 26, 2026
Following up from flutter#11169, this converts all the rest of the plugins in the repository to use Kotlin rather than Groovy for plugin build files. As with that PR, this does not change the example apps, only the plugin builds themselves.

Part of flutter/flutter#176065

## Pre-Review Checklist

[^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.
mboetger pushed a commit to mboetger/flutter that referenced this pull request Mar 26, 2026
…er#184123)

flutter/packages@8dcfd11...5909bdd

2026-03-25 47866232+chunhtai@users.noreply.github.com [ci] add more
permissions for create-pull-request (flutter/packages#11302)
2026-03-25 stuartmorgan@google.com [various] Add
`unintended_html_in_doc_comment` to analysis options
(flutter/packages#11303)
2026-03-25 matt.boetger@gmail.com Use deprecated dependency until legacy
renderer is removed (flutter/packages#11185)
2026-03-25 louisehsu@google.com [in_app_purchase_storekit] Address flaky
tests (flutter/packages#11270)
2026-03-25 stuartmorgan@google.com [google_maps_flutter] Fix A2A iOS
builds (flutter/packages#11290)
2026-03-25 stuartmorgan@google.com [mustache_template] Fix broken README
link (flutter/packages#11306)
2026-03-25 stuartmorgan@google.com [ci] Add a workflow to auto-remove
CICD label (flutter/packages#11301)
2026-03-25 stuartmorgan@google.com [various] Convert plugin builds to
Kotlin gradle (flutter/packages#11172)
2026-03-25 spkhalad@gmail.com [webview_flutter_platform_interface] Add
support for getting cookie (flutter/packages#11037)
2026-03-25 stuartmorgan@google.com [cupertino_icons] Remove empty Dart
file (flutter/packages#11308)
2026-03-25 stuartmorgan@google.com [camera] Regenerate iOS example with
Swift (flutter/packages#11283)
2026-03-25 tarrinneal@gmail.com [pigeon] Optimize data class equality
and hashing in Dart, Kotlin, java, and Swift, adds equality in other
languages (flutter/packages#11140)
2026-03-25 katelovett@google.com [two_dimensional_scrollables] Fix span
border decorations in flipped cross axes (flutter/packages#11334)

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
zhouyuanbo pushed a commit to zhouyuanbo/video_player_android_2.9.5 that referenced this pull request Mar 30, 2026
As a precursor to converting plugins to use Kotlin Gradle build files in flutter/packages#11172, this does some final standardization of the Groovy versions:
- Uses `"` instead of `'` on more lines.
- Uses `(...)` and `=` in places where it's optional, instead of just a space.
- Uses `minSdk` instead of `minSdkVersion`.
- Standardizes vertical whitespace (not necessary for the conversion, but it's something I cleaned up in that PR).

This is being done as a precursor PR because I noticed that the files are mostly right on the cusp of being similar enough for git to think they are renames with changes rather than deletion and addition; some are ending up one way, and some the other. Since renames with changes make blame much more useful, I'd like to make the files more similar so that hopefully almost all of them will end up as renames with changes in that PR.

## Pre-Review Checklist

[^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.
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Apr 14, 2026
…er#184123)

flutter/packages@8dcfd11...5909bdd

2026-03-25 47866232+chunhtai@users.noreply.github.com [ci] add more
permissions for create-pull-request (flutter/packages#11302)
2026-03-25 stuartmorgan@google.com [various] Add
`unintended_html_in_doc_comment` to analysis options
(flutter/packages#11303)
2026-03-25 matt.boetger@gmail.com Use deprecated dependency until legacy
renderer is removed (flutter/packages#11185)
2026-03-25 louisehsu@google.com [in_app_purchase_storekit] Address flaky
tests (flutter/packages#11270)
2026-03-25 stuartmorgan@google.com [google_maps_flutter] Fix A2A iOS
builds (flutter/packages#11290)
2026-03-25 stuartmorgan@google.com [mustache_template] Fix broken README
link (flutter/packages#11306)
2026-03-25 stuartmorgan@google.com [ci] Add a workflow to auto-remove
CICD label (flutter/packages#11301)
2026-03-25 stuartmorgan@google.com [various] Convert plugin builds to
Kotlin gradle (flutter/packages#11172)
2026-03-25 spkhalad@gmail.com [webview_flutter_platform_interface] Add
support for getting cookie (flutter/packages#11037)
2026-03-25 stuartmorgan@google.com [cupertino_icons] Remove empty Dart
file (flutter/packages#11308)
2026-03-25 stuartmorgan@google.com [camera] Regenerate iOS example with
Swift (flutter/packages#11283)
2026-03-25 tarrinneal@gmail.com [pigeon] Optimize data class equality
and hashing in Dart, Kotlin, java, and Swift, adds equality in other
languages (flutter/packages#11140)
2026-03-25 katelovett@google.com [two_dimensional_scrollables] Fix span
border decorations in flipped cross axes (flutter/packages#11334)

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.

3 participants