Skip to content

[various] Convert plugin builds to Kotlin gradle#11172

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

[various] Convert plugin builds to Kotlin gradle#11172
stuartmorgan-g wants to merge 35 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

auto-submit bot pushed a commit that referenced this pull request Mar 6, 2026
As a precursor to converting plugins to use Kotlin Gradle build files in #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.
@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.

Comment on lines +31 to +35
kotlin {
compilerOptions {
jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
}
}

Choose a reason for hiding this comment

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

medium

The allWarningsAsErrors = true option was removed during the conversion to Kotlin DSL. This is an important setting to maintain code quality by treating all compiler warnings as errors. Please add it back to the compilerOptions.

kotlin {
    compilerOptions {
        jvmTarget = JvmTarget.fromTarget(JavaVersion.VERSION_17.toString())
        allWarningsAsErrors.set(true)
    }
}

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.

1 participant