[various] Allow plugin example apps to build and test on JDK 25 - #13031
Conversation
…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.
|
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. |
There was a problem hiding this comment.
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.
…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
Update plugin example apps such that they can successfully build on JDK 25. Also ensure that tests can pass on JDK 25.
dangling-doc-commentsis 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
[shared_preferences]///).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-assistbot 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
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