Skip to content

[various] Convert plugin builds to Kotlin gradle#11172

Open
stuartmorgan-g wants to merge 37 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-all-plugins
Open

[various] Convert plugin builds to Kotlin gradle#11172
stuartmorgan-g wants to merge 37 commits intoflutter:mainfrom
stuartmorgan-g:kotlin-gradle-all-plugins

Conversation

@stuartmorgan-g
Copy link
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 added the CICD Run CI/CD label Mar 18, 2026
@stuartmorgan-g stuartmorgan-g added CICD Run CI/CD and removed CICD Run CI/CD labels Mar 18, 2026
@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

@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
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
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
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
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
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
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 and removed CICD Run CI/CD labels Mar 20, 2026
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