Add CI build using JDK 25 - #2921
Merged
Merged
Conversation
However, because building with JDK 25 does not fully work yet, mainly due to issues with ProGuard, still disallow building with JDK 25 by default. This way it fails fast for users locally instead of causing confusing failures later on.
Marcono1234
commented
Oct 6, 2025
| <jdk>[25,)</jdk> | ||
| </activation> | ||
| <properties> | ||
| <excludeTestCompilation>com/google/gson/functional/EnumWithObfuscatedTest.java</excludeTestCompilation> |
Contributor
Author
There was a problem hiding this comment.
For simplicity I reused the existing excludeTestCompilation property which we are already using for excluding JDK 17+ tests on JDK 11.
A slightly cleaner solution might be to adjust the maven-surefire-plugin configuration instead, to exclude that test. But I am not sure if that is worth it, given that hopefully soon in the future ProGuard supports JDK 25.
eamonnmcmanus
approved these changes
Oct 6, 2025
eamonnmcmanus
left a comment
Member
There was a problem hiding this comment.
Seems very reasonable. Thanks for doing this!
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.
Purpose
Add CI build using JDK 25, so that we can be sure Gson works with JDK 25
Supersedes #2847
Description
However, because building with JDK 25 does not fully work yet, mainly due to issues with ProGuard, still disallow building with JDK 25 by default. This way it fails fast for users locally instead of causing confusing failures later on.
Note that there are a few warnings related to
Unsafeusage by Maven (respectively its dependencies) and by protobuf-java.And also one test is causing warnings:
(that test uses all time zones provided by
TimeZone.getAvailableIDs())But besides that the build and Gson itself seems to work fine with JDK 25.