Skip to content

Conversation

reidbaker
Copy link
Contributor

@reidbaker reidbaker commented Oct 7, 2025

Fixes #flutter/flutter/issues/176027

Reviewers be sure to checkout script/tool/lib/src/gradle_check_command.dart which is a tools change.

  • update tool
  • update compile options to java 17
  • Update min flutter version
  • Update changelog and yamls

Pre-Review Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran [the auto-formatter].
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets, e.g. [shared_preferences]
  • I [linked to at least one issue that this PR fixes] in the description above.
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under[^1].
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under[^1].
  • I updated/added any relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or I have commented below to indicate which [test exemption] this PR falls under[^1].
  • All existing and new tests are passing.

@reidbaker
Copy link
Contributor Author

Will get an approval then handle merge conflicts.

Copy link
Contributor

@domesticmouse domesticmouse left a comment

Choose a reason for hiding this comment

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

LGTM for Flutter SVG

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

This pull request updates a large number of packages to use Java 17, which includes updating build.gradle files, pubspec.yaml files, and CHANGELOG.md files. The changes are mostly consistent, but I've found a few areas for improvement.

My review focuses on:

  • Ensuring consistency in the jvmTarget setting in build.gradle files.
  • Pointing out inconsistencies and redundancies in the CHANGELOG.md files.

Overall, the changes look good and are a welcome update. Addressing the minor issues I've pointed out will improve the consistency and clarity of the codebase.

@@ -1,3 +1,8 @@
## 2.5.0

* Updates Java compatibility version to 17.

Choose a reason for hiding this comment

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

high

The changelog for version 2.4.14 already mentions the update to Java 17. This new entry for 2.5.0 seems redundant. Please remove it to avoid confusion.

@@ -1,3 +1,8 @@
## 4.11.0

* Updates Java compatibility version to 17.

Choose a reason for hiding this comment

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

high

The changelog for version 4.10.3 already mentions the update to Java 17. This new entry for 4.11.0 seems redundant. Please remove it to avoid confusion.


kotlinOptions {
jvmTarget = '11'
jvmTarget = JavaVersion.VERSION_17

Choose a reason for hiding this comment

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

medium

For consistency with other build.gradle files in this PR, please use JavaVersion.VERSION_17.toString() for the jvmTarget. Most other files use this format.

        jvmTarget = JavaVersion.VERSION_17.toString()


kotlinOptions {
jvmTarget = '11'
jvmTarget = JavaVersion.VERSION_17

Choose a reason for hiding this comment

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

medium

For consistency with other build.gradle files in this PR, please use JavaVersion.VERSION_17.toString() for the jvmTarget. Most other files use this format.

        jvmTarget = JavaVersion.VERSION_17.toString()


kotlinOptions {
jvmTarget = '11'
jvmTarget = JavaVersion.VERSION_17

Choose a reason for hiding this comment

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

medium

For consistency with other build.gradle files in this PR, please use JavaVersion.VERSION_17.toString() for the jvmTarget. Most other files use this format.

        jvmTarget = JavaVersion.VERSION_17.toString()

## 2.6.0

* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
* Updates Java compatibility version to 17. If required, Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

Choose a reason for hiding this comment

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

medium

For consistency with other changelogs in this PR, please split this entry into two separate bullet points, like so:

* Updates Java compatibility version to 17.
* If required, Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.

Copy link
Contributor

@jesswrd jesswrd left a comment

Choose a reason for hiding this comment

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

Thanks again for agreeing to let this land first: #10187. Sorry for raining on your parade :0.


* Updates minimum supported SDK version to Flutter 3.29/Dart 3.7.
* Updates Java compatibility version to 17.
* If required, Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The "If required" is kind of confusing for a client-facing message. If you don't want to manually trim the line out of the packages that don't need it, I would just say "Sets minimum supported SDK version to Flutter 3.35/Dart 3.9."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If required was so that I could have the same message in all changelogs and handled the case where some plugins had already bumped to 3.35.

issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+camera%22

version: 0.10.10+8
version: 0.10.11
Copy link
Collaborator

Choose a reason for hiding this comment

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

0.10.10+1? I would expect this to be a bugfix version bump for everything, is that not the case?

@@ -1,3 +1,8 @@
## 1.1.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

This definitely shouldn't be a minor version bump; it's only changing example and test code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

(This is probably more manual tweaking than you want to do, but policywise it would be fine to skip changelog and version updates on the packages where the only change is to example and test code. The tool will think you need to version it because lib/main.dart is changing, but updating the autoformat version on pub.dev is not actually something that matters.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When making package wide changes I would only do that if the tooling had a way to figure that out for me.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We expect all changes in this PR to be a no-op for clients thought, right? I would version all of them as a bugfix, not minor, if that's the case; no package switching required.

@@ -1,3 +1,8 @@
## 1.1.0

* Updates Java compatibility version to 17.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Optional since it's manual work, but ideally this line should be removed from every package except the Android plugin implementation packages, since changing the Java version that example app uses is not a package-client-affecting change.

## 1.1.0

* Updates Java compatibility version to 17.
* If required, Updates minimum supported SDK version to Flutter 3.35/Dart 3.9.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Actually, here's something we could consider: I'd be fine with changing the Java version used in just the example app without changing the min SDK version. Technically this means someone could fail to build an example app that it looks like they should be able to but this would only happen:

  • if someone is checking out the repo and building the example app in the first place, which I believe to be quite rare outside of contributors, and
  • they are using an old version of Flutter, which is very unlikely for contributors, and
  • they are using an old version of Java.

So an option here would be reverting the changes in this PR for all packages where the only gradle change is in example/, and then doing a second PR for just the examples that only changes the Java version, and has no versioning, no changelog, no min SDK updates (and thus reformatting), etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I dont have a strong opinion on the order these things happen I just want to move to java 17 in the gradle files.

I would really like if I could use the same changelog entry for all packages and if I could ship a new version for all packages but I will do whatever you want.

Based on the comment above and @jesswrd pr that updated most packages for gradle 9 I will start this process over from scratch but invert the order. Start with the examples then try to land a pr that has tooling enforcement and the formatting and version bump changes.

@reidbaker reidbaker closed this Oct 8, 2025
auto-submit bot pushed a commit that referenced this pull request Oct 9, 2025
Part 1/2 for flutter/flutter/issues/176027 

CHANGELOG exemption: Example apps only. #10186 (comment)
Tool test will come in part 2 after the non examples have been updated. 

## Pre-Review Checklist
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.

4 participants