Sitelet https://github.com/flutter/packages/pull/13031
Skip to content

[various] Allow plugin example apps to build and test on JDK 25 - #13031

Merged
auto-submit[bot] merged 3 commits into
flutter:mainfrom
jesswrd:pack-jdk-25
Sep 30, 2026
Merged

auto-submit[bot] merged 3 commits into
flutter:mainfrom
jesswrd:pack-jdk-25

Conversation

@jesswrd

@jesswrd jesswrd commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Update plugin example apps such that they can successfully build on JDK 25. Also ensure that tests can pass on JDK 25.

  • Update mockito to 5.23.0 a version compatible with JDK 25
  • JDK 25's compiler added a dangling-doc-comments is a javac lint check that was new in JDK 23 (JDK-8303689) that warns when a Javadoc comment isnt attached to class, method, or field. These warnings appears in AGP generated classes, so we cannot directly address them. Instead, we can turn these warnings off and file an issue against AGP.

Fixes flutter/flutter#190069
Partially Addresses flutter/flutter#193404

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

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

…vac 23+

camera_android, in_app_purchase_android and url_launcher_android enable
buildConfig, and the header comment of the AGP-generated BuildConfig.java is a
dangling doc comment. javac 23+ warns about it, and the example apps build the
plugin with -Xlint:all -Werror, so the build fails on JDK 25.

The generated file can't be changed, so disable that one lint. javac 21
rejects -Xlint:-dangling-doc-comments as an invalid flag, so it is only added
when Gradle is running on JDK 23+.
Mockito 5.17.0 bundles a Byte Buddy that doesn't support Java 25 class files,
so the example app's unit test failed on JDK 25. 5.23.0 matches the version
the plugin itself already uses.
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 27, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

@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 Gradle build configurations for several Android example packages (camera_android, in_app_purchase_android, and url_launcher_android) to conditionally disable the dangling-doc-comments lint warning when compiling with Java 23 or higher, and upgrades mockito-core to version 5.23.0 in video_player_android. The review feedback notes that referencing JavaVersion.VERSION_23 directly will cause build compilation failures on Gradle versions older than 8.10, and suggests comparing the major version as an integer instead to maintain compatibility.

Comment thread packages/camera/camera_android/example/android/build.gradle.kts

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

RSLGTM

@jesswrd jesswrd added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 30, 2026
@auto-submit
auto-submit Bot merged commit d00aa3b into flutter:main Sep 30, 2026
13 checks passed
jesswrd pushed a commit to jesswrd/flutter that referenced this pull request Oct 1, 2026
…er#193641)

flutter/packages@0ba9a82...d5ec6db

2026-10-01 faheemabbas766@gmail.com [tool] Enforce README package table
order (flutter/packages#12316)
2026-09-30 jessiewong401@gmail.com [various] Allow plugin example apps
to build and test on JDK 25 (flutter/packages#13031)
2026-09-30 149176071+m1roxx@users.noreply.github.com [go_router] Expose
Navigator clipBehavior on ShellRoute and StatefulShellBranch
(flutter/packages#12646)
2026-09-30 stuartmorgan@google.com [google_maps_flutter] Convert unit
tests to Kotlin (flutter/packages#13072)
2026-09-30 36861262+QuncCccccc@users.noreply.github.com [material_ui]
Migrate M3 ListTile template to use new gen_defaults
(flutter/packages#13056)
2026-09-30 15619084+vashworth@users.noreply.github.com Allow tests to
use macOS 15.7 or macOS 26.6 (flutter/packages#13007)
2026-09-30 43054281+camsim99@users.noreply.github.com
[camera_android_camerax] Fix exposure offset setting error thrown when
canceled by a new request (flutter/packages#12582)
2026-09-30 engine-flutter-autoroll@skia.org Roll Flutter from
55b8f88 to d649d2b (27 revisions) (flutter/packages#13080)
2026-09-30 36861262+QuncCccccc@users.noreply.github.com [material_ui]
Migrate M3 InputDecorator template to use new gen_defaults
(flutter/packages#13024)
2026-09-30 tarrinneal@gmail.com [pigeon] Fix JNI/FFI typed data memory
lifetime bugs and update docs (flutter/packages#13061)
2026-09-30 43054281+camsim99@users.noreply.github.com
[camera_android_camerax] Correct `pre-push` skill version validation
logic (flutter/packages#12371)

If this roll has caused a breakage, revert this CL and set the roller
to dry run mode 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
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.

Android examples fail to compile with latest Android Studio RC/JDK due to BuildConfig.java warning treated as error (-Werror)

2 participants