Skip to content

Update Android plugin language guidance - #192906

Merged
auto-submit[bot] merged 1 commit into
flutter:masterfrom
stuartmorgan-g:kotlin-plugin-policy-update
Sep 21, 2026
Merged

auto-submit[bot] merged 1 commit into
flutter:masterfrom
stuartmorgan-g:kotlin-plugin-policy-update

Conversation

@stuartmorgan-g

Copy link
Copy Markdown
Contributor

Change the policy for flutter/packages to prefer Kotlin rather than Java for new code, per RFC 720.0001

Part of #188630

@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 17, 2026
@github-actions github-actions Bot added package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team d: docs/ flutter/flutter/docs, for contributors labels Sep 17, 2026

@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 the Android plugin development policy in the documentation to clarify language usage guidelines. The reviewer suggests restructuring the list to better distinguish between non-migration and migration PR requirements for improved logical clarity.

Comment on lines +257 to +265
- Android: Depends on the plugin. For non-migration PRs use:
- Kotlin if the plugin is already in Kotlin, or for new plugins.
- Kotlin when adding a new file to a Java or mixed-language plugin, unless there
are interop issues with existing Java code that make doing so difficult.
- Kotlin when adding new tests (when feasible).
- Java when modifying existing Java code.
- **Note**: Only Flutter team members may migrate an existing plugin's Java code
to Kotlin, due to the potential difficulty of reviewing such PRs; migration
PRs from non-team members will be rejected.

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.

medium

The current structure lists the migration policy note under the bullet point introduced by 'For non-migration PRs use:'. This is logically contradictory. Consider restructuring the list to separate the guidelines for non-migration PRs and migration PRs clearly.

Suggested change
- Android: Depends on the plugin. For non-migration PRs use:
- Kotlin if the plugin is already in Kotlin, or for new plugins.
- Kotlin when adding a new file to a Java or mixed-language plugin, unless there
are interop issues with existing Java code that make doing so difficult.
- Kotlin when adding new tests (when feasible).
- Java when modifying existing Java code.
- **Note**: Only Flutter team members may migrate an existing plugin's Java code
to Kotlin, due to the potential difficulty of reviewing such PRs; migration
PRs from non-team members will be rejected.
- Android: Depends on the plugin.\n - For non-migration PRs, use:\n - Kotlin if the plugin is already in Kotlin, or for new plugins.\n - Kotlin when adding a new file to a Java or mixed-language plugin, unless there\n are interop issues with existing Java code that make doing so difficult.\n - Kotlin when adding new tests (when feasible).\n - Java when modifying existing Java code.\n - For migration PRs: Only Flutter team members may migrate an existing plugin's Java code\n to Kotlin, due to the potential difficulty of reviewing such PRs; migration\n PRs from non-team members will be rejected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This bothered me slightly when writing it, but I didn't (and don't) think it's worth adding nesting to the list just to avoid.

@mboetger mboetger 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.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD d: docs/ flutter/flutter/docs, for contributors package flutter/packages repository. See also p: labels. team-ecosystem Owned by Ecosystem team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants