Lower the supported Java floor to 17 (test on JDK 17/21/25) - #4
Merged
Conversation
Replace the SequencedCollection `List.getFirst()` (Java 21) with the equivalent `List.get(0)` so the source compiles on Java 17. Behavior is identical: both return the first element of the resource property sources.
Drop `minJavaVersion` from 21 to 17 so the published bytecode is compiled `--release 17`, broadening the range of consumers that can use the library. The compile toolchain (`jdkVersion`) stays at 21. Align the CI matrix to the current LTS set [17, 21, 25], dropping the now-EOL 22/23. The compile/daemon JDK pinned in setup-java stays at 21, as the org.framefork.build plugin still requires a 21+ runtime to resolve.
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.
What & why
Lowers the supported Java floor from 21 to 17. The published bytecode is now compiled
--release 17, so the library can be consumed on any JDK 17+ runtime rather than requiring 21+. The compile toolchain (framefork { jdkVersion }) stays at 21.The CI test matrix moves from
[21, 22, 23]to the current LTS set[17, 21, 25], dropping the now-EOL 22/23 and adding 17 (the new floor) and 25 (current LTS). The compile/daemon JDK pinned insetup-javastays at 21 because theorg.framefork.buildconvention plugin still needs a 21+ runtime to resolve on the buildscript classpath.Source changes
The branch is shaped as two commits, source-compat first so every commit builds:
refactor:— avoid the handful of Java 21 idioms so the source compiles on Java 17 (semantics unchanged).build:— dropminJavaVersionto 17 and retarget the CI matrix.Java 21 idioms unrolled to Java 17 equivalents:
List.getFirst()(Java 21SequencedCollection) ->List.get(0)inPropertySourcesOverridePrecedencePostProcessor; identical result, the list is already known non-empty at that point.Verification
Run locally in a worktree with JDK 17/21/25 available via SDKMAN:
./gradlew clean build— green: compiles--release 17, Error Prone / NullAway / doclint all pass../gradlew build -Ptests.jdk.version=17 --rerun-tasks— green: tests genuinely execute on a JDK 17 launcher.javap -von a compiled main-module class reports major version 61 (Java 17 bytecode).