Skip to content

[tool] Update java formatter#11508

Merged
auto-submit[bot] merged 6 commits intoflutter:mainfrom
stuartmorgan-g:update-java-formatter
Apr 15, 2026
Merged

[tool] Update java formatter#11508
auto-submit[bot] merged 6 commits intoflutter:mainfrom
stuartmorgan-g:update-java-formatter

Conversation

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator

Updates the Java formatter from 1.3 to 1.28, which is the latest version of the formatter that can be run with Java 17. Version 1.3 doesn't understand newer Java syntax that we could be using in plugins now that they all require Java 17, such as pattern expressions and switch expressions.

The changes outside of script/tool/ ware made by:

  • Running the repo tool format command with the new version.
  • Asking Gemini to fix up some bad comment wrapping in the autoformat changes (committed as a separate commit, for ease of reviewing). The new formatter enforces line length limits on comments, but doesn't re-wrap later lines after adding breaks, resulting in some comments like:
    // Some long comment whose first line was slightly too
    // long
    // and then a bit more.

@stuartmorgan-g
Copy link
Copy Markdown
Collaborator Author

CHANGELOG/version override: These are just format changes in native code, so there is value to clients in releasing them.

@stuartmorgan-g stuartmorgan-g added the CICD Run CI/CD label Apr 14, 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 updates the Java formatter to version 1.28.0 in the tool script and applies various formatting and documentation improvements across multiple Android plugin packages, including camera, file_selector, google_maps_flutter, image_picker, in_app_purchase, quick_actions, shared_preferences, url_launcher, video_player, webview_flutter, and pigeon-generated code. I have no feedback to provide.

@github-actions github-actions bot removed the CICD Run CI/CD label Apr 15, 2026
@stuartmorgan-g stuartmorgan-g added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD labels Apr 15, 2026
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 15, 2026
@auto-submit
Copy link
Copy Markdown
Contributor

auto-submit bot commented Apr 15, 2026

autosubmit label was removed for flutter/packages/11508, because Pull request flutter/packages/11508 is not in a mergeable state.

@stuartmorgan-g stuartmorgan-g added autosubmit Merge PR when tree becomes green via auto submit App CICD Run CI/CD and removed CICD Run CI/CD labels Apr 15, 2026
@github-actions github-actions bot removed the CICD Run CI/CD label Apr 15, 2026
@auto-submit auto-submit bot merged commit a9d6c1c into flutter:main Apr 15, 2026
82 checks passed
@stuartmorgan-g stuartmorgan-g deleted the update-java-formatter branch April 15, 2026 14:38
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.

2 participants