-
Notifications
You must be signed in to change notification settings - Fork 534
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
[build] Support JDK-21 #9672
Merged
Merged
[build] Support JDK-21 #9672
Conversation
This file contains 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
Context: #9651 PR #9651 demonstrated that it was fairly straightforward to use JDK-21 on CI. We don't want to fully bump to JDK-21, because we still support building with JDK-17, so we *at minimum* need to run tests on both JDK-17 and JDK-21. As a "minimal introductory step", add support for JDK-21: * Update to Gradle 8.12, for harmony with dotnet/java-interop. * Update the `<Javac/>` task to use `javac --release N` when using JDK-17 and later. JDK-11 doesn't support `javac --release`. (Why care about JDK-11? Because .NET 8 still supports it, and this will make future cherry-picking easier.) * Set `$(LatestSupportedJavaVersion)`=21.0.99, which removes the XA0030 error which would result from using JDK-21. * Update `tools/workload-dependencies` to use `$(LatestSupportedJavaVersion)` property, instead of always using `$(JavaSdkVersion)+1`.
jonpryor
requested review from
Copilot,
dellis1972 and
jonathanpeppers
and removed request for
dellis1972 and
jonathanpeppers
January 10, 2025 19:58
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 5 changed files in this pull request and generated no comments.
Files not reviewed (3)
- build-tools/gradle/gradle/wrapper/gradle-wrapper.properties: Language not supported
- src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.props.in: Language not supported
- tools/workload-dependencies/WorkloadDependencies.proj: Language not supported
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
MAUI Integration tests are expected to fail at present; see 37014d1. |
jonathanpeppers
approved these changes
Jan 13, 2025
dellis1972
approved these changes
Jan 13, 2025
grendello
added a commit
that referenced
this pull request
Jan 14, 2025
* main: [ci] Add template for setting JAVA_HOME vars (#9671) Bump com.android.tools.build:manifest-merger from 31.7.3 to 31.8.0 (#9678) Bump to dotnet/sdk@2dd591056f 10.0.100-alpha.1.25062.16 (#9679) Bump com.android.tools:r8 from 8.5.35 to 8.7.18 (#9677) Bump to dotnet/java-interop@4f06201 (#9676) Bump to dotnet/android-api-docs@492e524d (#9668) [build] Support JDK-21 (#9672)
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.
Context: #9651
PR #9651 demonstrated that it was fairly straightforward to use JDK-21 on CI. We don't want to fully bump to JDK-21, because we still support building with JDK-17, so we at minimum need to run tests on both JDK-17 and JDK-21.
As a "minimal introductory step", add support for JDK-21:
Update to Gradle 8.12, for harmony with dotnet/java-interop.
Update the
<Javac/>
task to usejavac --release N
when using JDK-17 and later. JDK-11 doesn't supportjavac --release
. (Why care about JDK-11? Because .NET 8 still supports it, and this will make future cherry-picking easier.)Set
$(LatestSupportedJavaVersion)
=21.0.99, which removes the XA0030 error which would result from using JDK-21.Update
tools/workload-dependencies
to use$(LatestSupportedJavaVersion)
property, instead of always using$(JavaSdkVersion)+1
.