Skip to content

Conversation

jesswrd
Copy link
Contributor

@jesswrd jesswrd commented Oct 8, 2025

Bumping CI to Test Against JDK 21. This is part of the setup to use a robolectric version that supports SDK 36. This new robolectric version requires JDK 21 at minimum.

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 3

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

I've reviewed the changes to update the JDK version in the CI configuration. The changes are straightforward and align with the goal of preparing for a Robolectric upgrade. I have a couple of suggestions to improve build reproducibility by pinning the JDK to a more specific version, which is a common best practice and seems to be followed for other dependencies in this file. Please see my detailed comments below.

[
{"dependency": "android_sdk", "version": "version:36v3"},
{"dependency": "open_jdk", "version": "version:17"},
{"dependency": "open_jdk", "version": "version:21"},

Choose a reason for hiding this comment

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

medium

For improved build reproducibility, it's a best practice to pin dependencies to a specific version. Other dependencies in this file, like curl (7.64.0), are pinned. To align with this practice and prevent potential build breakages, could we pin open_jdk to a more specific version (e.g., 21.0.2)? This would ensure build stability if a future JDK 21 update introduces incompatibilities.

          {"dependency": "open_jdk", "version": "version:21.0.2"},

[
{"dependency": "clang", "version": "git_revision:5d5aba78dbbee75508f01bcaa69aedb2ab79065a"},
{"dependency": "open_jdk", "version": "version:17"}
{"dependency": "open_jdk", "version": "version:21"}

Choose a reason for hiding this comment

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

medium

For consistency and build stability, let's also pin the open_jdk version here to a specific version (e.g., 21.0.2). This ensures that the Javadoc generation uses the same predictable JDK version as the tests.

          {"dependency": "open_jdk", "version": "version:21.0.2"}

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant