Repository navigation
Show builds on JDK 17 how to use the 17 line - #27
Merged
Merged
Conversation
17.1.0 is out: the formatter and the Gradle plugin built for Java 17, which format every file that javac 17 parses as the 21 release of the same minor version does. The Gradle page gets a section on it: the plugin version, the native binary through openjavaformat.native.formatter.version, and a Dependabot rule that keeps a build on 17.x. Spotless and Get started name 17.x for Java 17 to 20. zensical.toml holds the 17 line's version and its 21 release as variables of their own, which follow-releases.yml does not move.
The hourly bump followed ojf_version alone, with the latest release, which a 17.x never is. It now also sets ojf_17_version to the newest published 17.x, and ojf_17_native_version to the newest 21 release of that minor version, whose native binary the 17 line's Gradle plugin runs. Each moves only to a higher version, and one commit names every version that moved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before this PR
17.1.0, the first release of the 17 line (openjavaformat/open-java-format#293), is out, but every page says the formatter needs Java 21. A Gradle daemon on JDK 17 cannot load the 21.x plugin at all, and nothing says how a build on JDK 17 to 20 formats.
After this PR
openjavaformat.native.formatter.versionnames the 21 release whose binary the plugin runs. A Dependabot rule ignores the major updates ofdev.openjavaformat*, which would offer 21.x. The intro links to the section.dev.openjavaformat:open-java-format.zensical.toml.ojf_17_versionandojf_17_native_version, next toojf_version.follow-releases.yml. The hourly bump followedojf_versionalone, with the latest release, which a 17.x never is. It now also setsojf_17_versionto the newest published 17.x andojf_17_native_versionto the newest 21 release of that minor version. Each moves only to a higher version, and one commit names every version that moved.Checked: the bump step, run against the real releases, keeps 21.1.2, 17.1.0 and 21.1.2 as they are; from 21.1.1, 17.0.9 and 21.0.1 it moves all three to them; and from versions above every release it moves none. zizmor finds nothing in the workflow.
zensical build --clean --strictfinds no issues, and the rendered pages show17.1.0and21.1.2in place of the variables. The commands on the pages were run against the published 17.1.0 on JDK 17:formatDiffwith the Gradle plugin, both on the Gradle JVM and with the 21.1.2 native binary,spotless:checkandspotless:applywith the Spotless Maven plugin 3.12.0, andcheckandformatof fmt-maven-plugin 2.27.0.3 with 17.1.0: both checks pass on a file that 21.1.2 formatted and fail on an unformatted one, and both formatting goals give 21.1.2's output.Possible downsides?
ignorewithupdate-types.