Repository navigation
Conversation
abashev
force-pushed
the
abashev/build-on-java-17
branch
2 times, most recently
from
November 29, 2026 09:37
aec03d4 to
4a4cbef
Compare
The plugin was compiled for Java 21 because open-java-format 21.x is. It is now compiled for 17, so it runs with the formatter's 17 line on JDK 17 and with either line on JDK 21 and later. - java.version 17; the release, CodeQL, the dependency submission and mise.toml on Temurin 17. - pom.xml holds one version per formatter line, open-java-format-17.version and open-java-format-21.version, and a profile for each picks it. A build without a profile uses the 17 line. - CI tests the 17 line on JDK 17 and the 21 line on JDK 21 and 25. The required check, build, waits for every leg. - follow-releases.yml moves each line to the highest published release of that line, and the README's examples along with the 21 line. Dependabot leaves open-java-format alone. - maven-plugin-plugin's requiredJavaVersion is java.version: "auto" took 21 from the formatter's classes. - The README names the JDK each formatter line needs.
abashev
force-pushed
the
abashev/build-on-java-17
branch
from
November 29, 2026 10:03
4a4cbef to
3308adc
Compare
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
The plugin is compiled for Java 21, because open-java-format 21.x is, and CI, the release, CodeQL and the dependency submission build on JDK 21. A Maven build on JDK 17 to 20 cannot load the plugin, even with a formatter that runs there. CI tests one formatter version, the one Dependabot moves, and
follow-releases.ymlmoves the README to the release GitHub marks Latest.After this PR
java.version17: the plugin's classes are Java 17. The release, CodeQL, the dependency submission andmise.tomluse Temurin 17.pom.xmlholds one formatter version per line,open-java-format-17.version(17.1.0, the first release of the 17 line, A 17.X.X release line: the formatter and the Gradle plugin on Java 17, backported from 21.X.X open-java-format#293) andopen-java-format-21.version(21.1.2). The profilesopen-java-format-17andopen-java-format-21pick one, and a build without a profile uses the 17 line, which runs on every JDK the plugin does. Profiles, because the integration tests take the version from the POM's properties: a-Dopen-java-format.versionchanges the compile classpath but does not reach them.buildis now a job that waits for every leg, so the auto-merge of a new 21.x waits for JDK 21 and 25 too, and not for JDK 17 alone.follow-releases.ymltakes the highest published release of each line, not the one GitHub marks Latest, which a 17.x release never is. A new 21.x movesopen-java-format-21.versionand the README's examples in one pull request, so the README names it only once the plugin passed its tests with it. A new 17.x movesopen-java-format-17.versionon its own branch,follow-releases/open-java-format-17. The plugin's own releases move the README as before.requiredJavaVersionis${java.version}. Withauto, it took the Java version from the formatter's classes as well: with 21.0.2 it wrote 21 intoplugin.xml, although every class of the plugin was compiled for 17, and Maven 4 would then refuse the plugin on JDK 17.Checked locally:
-P open-java-format-21on Temurin 21 and on OpenJDK 25:mvn verifypasses, with 38 unit tests and 30 integration tests, and all 29 integration projects get 21.1.2. The jar's classes are class file version 61, andplugin.xmlsays 17.-P open-java-format-17fails only on resolving 17.1.0. The plugin built on 21 loads and runs on Temurin 17, and there it fails on 21.1.2 withUnsupportedClassVersionError, as it should.follow-releases.ymlstep script incatthehacker/ubuntu:act-24.04, with the real release lists, a local bare repository as origin and a stand-inghfor the pull requests: no new release on either line or for the plugin; a new 21.x, with a later 17.x published after it; the same run again; a new 17.x; only a lower 17.x; and a new plugin release.Possible downsides?
build. Merge after 17.1.0 is released, and re-run the checks first. Merged earlier, it would fail every pull request, Dependabot's included.follow-releases.ymlrun after the merge is the first real one with the new matrix; until 17.1.0 is out, the 17 job only says the line has no release yet.