Skip to content

[local_auth] Convert to Kotlin gradle for the plugin build files#11169

Merged
auto-submit[bot] merged 11 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-for-plugin-initial-local-auth
Mar 18, 2026
Merged

[local_auth] Convert to Kotlin gradle for the plugin build files#11169
auto-submit[bot] merged 11 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-for-plugin-initial-local-auth

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

@stuartmorgan-g stuartmorgan-g commented Mar 3, 2026

Following up from #11127, this is the initial example of converting a plugin build, rather than an example app build, to Kotlin gradle.

This conversion was done manually, but closely referencing the current plugin template files. It differs mostly in not having the parts that are specific to the use of Kotlin source files, since local_auth is still Java-only. Later (when we start adopting Kotlin Pigeon generation everywhere, for instance) some of the diffs relative to the template files will go away.

Unlike #11127 this did not require tool changes, as it turns out that the previous changes were enough to handle these files, but I did add more tests. As with #11127 I did not attempt to comprehensively duplicate all Groovy tests, since we should be able to relatively quickly convert everything in the repo, and then pull out the Groovy support and update all the tests to Kotlin.

Note that this does not convert the plugin's example app to Kotlin gradle, only the plugin itself. The example app for plugins are non-trivial enough (due to native tests) that they should be converted separately. This has the bonus effect of validating that the plugin migration didn't require any changes in the client app.

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

checkAllWarnings = true
warningsAsErrors = true
disable 'AndroidGradlePluginVersion', 'InvalidPackage', 'GradleDependency', 'NewerVersionAvailable'
disable.addAll(setOf("AndroidGradlePluginVersion", "InvalidPackage", "GradleDependency", "NewerVersionAvailable"))
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.

A note here in case future us wonders why it's written this way: the examples I found in official docs did something like:

disable += "AndroidGradlePluginVersion" + "InvalidPackage" + "GradleDependency" + "NewerVersionAvailable"

When I tried that it was clearly doing string concatenation rather than list addition (I got an error about AndroidGradlePluginVersionInvalidPackageGradleDependencyNewerVersionAvailable being an unknown lint to ignore). I'm assuming that's a Gradle version issue or something? This version works, and seemed reasonable.

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.

https://developer.android.com/studio/write/lint#gradle was the documentation I found, for posterity.

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 converts the local_auth_android plugin's Gradle build files from Groovy to Kotlin DSL, which is a good step towards modernizing the build process. The changes involve renaming build.gradle and settings.gradle to use the .kts extension and updating their syntax accordingly. Additionally, the gradle-check command's tests have been updated to accommodate and validate these new Kotlin Gradle files, including the addition of a new test helper and relevant test cases. The conversion of the plugin's build files appears to be well-executed. I have one suggestion to improve the new test helper code.

@stuartmorgan-g stuartmorgan-g added the triage-android Should be looked at in Android triage label Mar 17, 2026
@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label Mar 18, 2026
@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

@mboetger Ping on this review?

Copy link
Copy Markdown
Contributor

@mboetger mboetger left a comment

Choose a reason for hiding this comment

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

LGTM.

@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 18, 2026
@auto-submit auto-submit bot merged commit b3a6959 into flutter:main Mar 18, 2026
81 checks passed
@stuartmorgan-g stuartmorgan-g deleted the kotlin-gradle-for-plugin-initial-local-auth branch March 18, 2026 20:25
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 19, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 19, 2026
flutter/packages@afa1a1c...99155a8

2026-03-19 engine-flutter-autoroll@skia.org Roll Flutter from
d117642 to dd64978 (24 revisions) (flutter/packages#11281)
2026-03-18 stuartmorgan@google.com [local_auth] Convert to Kotlin gradle
for the plugin build files (flutter/packages#11169)
2026-03-18 stuartmorgan@google.com [google_maps_flutter] Add color
scheme support to app-facing package (flutter/packages#11280)
2026-03-18 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_wkwebview] Updates platform views on iOS to only have a
weak reference to the native view (flutter/packages#11175)
2026-03-18 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump androidx.core:core from 1.17.0 to 1.18.0 in
/packages/local_auth/local_auth_android/android (flutter/packages#11256)
2026-03-18 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump androidx.core:core-ktx from 1.13.0 to 1.18.0 in
/packages/interactive_media_ads/android (flutter/packages#11255)
2026-03-18 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
ff37bef to 2c9eb20 (6 revisions) (flutter/packages#11285)
2026-03-18 stuartmorgan@google.com [google_maps_flutter] Add color
scheme support to web implementation (flutter/packages#11279)
2026-03-18 elitree@gmail.com [google_maps_flutter_android] Batch
clustered marker operations (flutter/packages#10940)

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
nateshmbhat pushed a commit to nateshmbhat/flutter_packages that referenced this pull request Mar 25, 2026
…tter#11169)

Following up from flutter#11127, this is the initial example of converting a plugin build, rather than an example app build, to Kotlin gradle.

This conversion was done manually, but closely referencing the current plugin template files. It differs mostly in not having the parts that are specific to the use of Kotlin source files, since `local_auth` is still Java-only. Later (when we start adopting Kotlin Pigeon generation everywhere, for instance) some of the diffs relative to the template files will go away.

Unlike flutter#11127 this did not require tool changes, as it turns out that the previous changes were enough to handle these files, but I did add more tests. As with flutter#11127 I did not attempt to comprehensively duplicate all Groovy tests, since we should be able to relatively quickly convert everything in the repo, and then pull out the Groovy support and update all the tests to Kotlin.

Note that this does *not* convert the plugin's example app to Kotlin gradle, only the plugin itself. The example app for plugins are non-trivial enough (due to native tests) that they should be converted separately. This has the bonus effect of validating that the plugin migration didn't require any changes in the client app.

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.
auto-submit bot pushed a commit that referenced this pull request Mar 25, 2026
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

[^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
…tter#11169)

Following up from flutter#11127, this is the initial example of converting a plugin build, rather than an example app build, to Kotlin gradle.

This conversion was done manually, but closely referencing the current plugin template files. It differs mostly in not having the parts that are specific to the use of Kotlin source files, since `local_auth` is still Java-only. Later (when we start adopting Kotlin Pigeon generation everywhere, for instance) some of the diffs relative to the template files will go away.

Unlike flutter#11127 this did not require tool changes, as it turns out that the previous changes were enough to handle these files, but I did add more tests. As with flutter#11127 I did not attempt to comprehensively duplicate all Groovy tests, since we should be able to relatively quickly convert everything in the repo, and then pull out the Groovy support and update all the tests to Kotlin.

Note that this does *not* convert the plugin's example app to Kotlin gradle, only the plugin itself. The example app for plugins are non-trivial enough (due to native tests) that they should be converted separately. This has the bonus effect of validating that the plugin migration didn't require any changes in the client app.

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.
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
…r#183890)

flutter/packages@afa1a1c...99155a8

2026-03-19 engine-flutter-autoroll@skia.org Roll Flutter from
d117642 to dd64978 (24 revisions) (flutter/packages#11281)
2026-03-18 stuartmorgan@google.com [local_auth] Convert to Kotlin gradle
for the plugin build files (flutter/packages#11169)
2026-03-18 stuartmorgan@google.com [google_maps_flutter] Add color
scheme support to app-facing package (flutter/packages#11280)
2026-03-18 10687576+bparrishMines@users.noreply.github.com
[webview_flutter_wkwebview] Updates platform views on iOS to only have a
weak reference to the native view (flutter/packages#11175)
2026-03-18 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump androidx.core:core from 1.17.0 to 1.18.0 in
/packages/local_auth/local_auth_android/android (flutter/packages#11256)
2026-03-18 49699333+dependabot[bot]@users.noreply.github.com
[dependabot]: Bump androidx.core:core-ktx from 1.13.0 to 1.18.0 in
/packages/interactive_media_ads/android (flutter/packages#11255)
2026-03-18 engine-flutter-autoroll@skia.org Roll Flutter (stable) from
ff37bef to 2c9eb20 (6 revisions) (flutter/packages#11285)
2026-03-18 stuartmorgan@google.com [google_maps_flutter] Add color
scheme support to web implementation (flutter/packages#11279)
2026-03-18 elitree@gmail.com [google_maps_flutter_android] Batch
clustered marker operations (flutter/packages#10940)

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
Following up from flutter/packages#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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD p: local_auth platform-android triage-android Should be looked at in Android triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants