Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support building with JDK 21. #2690

Closed
wants to merge 4 commits into from
Closed

Conversation

eamonnmcmanus
Copy link
Member

I think the main reason we weren't doing this before is that the ProGuard plugin didn't support it. Apparently it does now.

I think the main reason we weren't doing this before is that the ProGuard plugin
didn't support it. Apparently it does now.
@eamonnmcmanus eamonnmcmanus marked this pull request as draft May 29, 2024 13:26
@eamonnmcmanus
Copy link
Member Author

Hmm, this is looking more complicated than I thought.

We are not planning to build using JDK 21 for releases any time soon, but it would be more convenient for testing if we supported building there. The current failures don't prevent testing but make for an awkward setup.

@Marcono1234
Copy link
Collaborator

I think all plugins should support JDK 21 now. The main problem with JDK 21 is that it does not support Java 7 as target version.
That is why the pom.xml currently increases the target version to Java 8 when building with JDK 21. And it is also the reason why building with JDK 21 is artificially prevented with the Enforcer Plugin at the moment, to avoid that users accidentally build a Gson release version which targets Java 8 instead of 7. See also #2552.

Most likely the check-api-compatibility failure is unrelated; maybe #2685 introduced some issues I forgot to consider, I will have a look. The problem with the current check-api-compatibility setup is that these issues often only occur for the next pull request..., sorry.

@Marcono1234
Copy link
Collaborator

Also to clarify, CI is already building with JDK 21, see #2552. It just disables the Enforcer Plugin check which intentionally prevents this by default.

@eamonnmcmanus
Copy link
Member Author

I think this is basically obsolete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants