Skip to content

[build] Bump Microsoft Build of OpenJDK to 25.0.5.1 - #13619

Merged
jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-effective-broccoli
Nov 18, 2026
Merged

jonathanpeppers merged 4 commits into
mainfrom
jonathanpeppers-effective-broccoli

Conversation

@jonathanpeppers

@jonathanpeppers jonathanpeppers commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Keep the repository's Microsoft Build of OpenJDK 25 toolchain current with the latest 25.0.5.1 release.

Use the latest Microsoft JDK 25 available to setup-java for Gradle dependency submission. Update the default JDK for InstallAndroidDependencies to 21.0.13.1 and add it to the workload dependency feed.

The live Android manifest feed needs a separate update for .NET 11 GA to install this version on request.

Validation:

  • dotnet build src\openjdk\openjdk.csproj: passed on Windows.
  • dotnet msbuild src\Xamarin.Installer.Build.Tasks\Xamarin.Installer.Common.props -getProperty:JavaSdkVersion: passed.
  • dotnet run --project tools\workload-dependencies\workload-dependencies.csproj -p:MonoOptionsVersion=6.12.0.148 -- --feed=tools\workload-dependencies\AndroidManifestFeed_d18.0.xml --jdk-version=21.0.13.1 --jdk-max-version=25.0.99: passed; recommended version is 21.0.13.1.
  • Verified all six JDK 21 archives against Microsoft's published SHA-256 checksums.
  • The full SDK build, JDK 21 end-to-end installation, and Gradle workflow were not run locally.

Context: https://openjdk.org/groups/vulnerability/advisories/2026-11-17

The current OpenJDK version is affected by CVE-2026-114938. Update the build JDK to 25.0.5.1 to pick up the security fixes.

Validation: dotnet build src\openjdk\openjdk.csproj passed with isolated toolchain and cache directories.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 18, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the OpenJDK toolchain pin update.

No open issues 🎉

What changed in this PR

Updates the Microsoft Build of OpenJDK toolchain pins used to provision the JDK for .NET for Android builds.

Changes:

  • Changes the default JDK version from 25.0.4.1 to 25.0.5.1.
  • Changes the expected archive root from jdk-25.0.4.1+1 to jdk-25.0.5.1+2, while retaining the jdk-25 installation folder.
File Description
Configuration.props Updates the OpenJDK version and expected archive root directory.

Review effort: Balanced

jonathanpeppers and others added 3 commits November 18, 2026 10:04
The setup-java catalog can lag behind published JDK archives, causing dependency submission to fail when the repository pins a newer version. Use the latest cataloged JDK 25 and remove the exact-version parsing. The workflow can use an older JDK than the repository pin until the catalog catches up.

Validation: actionlint -shellcheck= .github\workflows\gradle-dependency-submission.yml passed; YAML and JDK selection checks passed.

Co-authored-by: Copilot App <[email protected]>
Update the default JavaSdkVersion used by InstallAndroidDependencies and add the release to the workload dependency feed. Newly generated workload metadata recommends this version.

The installer still accepts an existing JDK with the same or a newer major version. .NET 11 GA requires the live Android manifest feed to be updated separately.

Validation:
  * dotnet msbuild src\Xamarin.Installer.Build.Tasks\Xamarin.Installer.Common.props -getProperty:JavaSdkVersion: passed.
  * dotnet run --project tools\workload-dependencies\workload-dependencies.csproj -p:MonoOptionsVersion=6.12.0.148 -- --feed=tools\workload-dependencies\AndroidManifestFeed_d18.0.xml --jdk-version=21.0.13.1 --jdk-max-version=25.0.99: passed; recommendedVersion is 21.0.13.1.
  * The SDK build and end-to-end installer were not run.

Co-authored-by: Copilot App <[email protected]>
@jonathanpeppers

Copy link
Copy Markdown
Member Author

@dalexsoto review

@jonathanpeppers jonathanpeppers added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label Nov 18, 2026

@dalexsoto dalexsoto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 98fa4a65 against main at 5ecb8f71 (merge-base 7781c75e). This was a static, read-only review; I didn't build or run anything.

LGTM. What I checked:

  • Dependency-submission workflow: nothing at this head still references the removed java output. setup-java with distribution: microsoft, java-version: '25' and check-latest: true is valid.
  • OpenJDK 25.0.5.1: the archives exist for all six platforms. Their root directory is jdk-25.0.5.1+2/ (checked linux-x64, macOS-aarch64 and windows-x64), so MicrosoftOpenJDKRootDirName is correct. src/openjdk/openjdk.targets reads the expected hash from the published .sha256sum.txt, so there's no pinned hash that also needed updating.
  • Default JDK 21.0.13.1: InstallAndroidDependencies parses the 4-part version and compares only the major version. The download and .sig signature URLs resolve.
  • AndroidManifestFeed_d18.0.xml: all six size values exactly match the servers' Content-Length, and every payloadFileName matches its URL. workload-dependencies sorts entries by System.Version, so the 4-part revision and its position in the file are fine.
  • Remaining 25.0.4.1/21.0.8 strings: they're test fixtures or comments and don't depend on these defaults. The two commits that landed on main since the merge-base don't touch any of these paths.

One thing I didn't verify: I didn't recompute the SHA-1 checksums in the new feed entry, because that needs the full ~200 MB archives. That's a limit of this review, not a problem with the PR. Updating the live manifest feed is out of scope, as the description says.

@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) November 18, 2026 22:27
@jonathanpeppers
jonathanpeppers merged commit dba7c0f into main Nov 18, 2026
47 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-effective-broccoli branch November 18, 2026 23:24
jonathanpeppers added a commit that referenced this pull request Nov 20, 2026
Context: #13619

Keep the repository's Microsoft Build of OpenJDK 21 toolchain current with the latest 21.0.13.1 release. This is the release/10.0.1xx counterpart of #13619, which updated the JDK 25 build toolchain and the JDK 21 `InstallAndroidDependencies` default on `main`.

On this branch, xaprepare's `MicrosoftOpenJDKVersion` sets both the JDK that builds the repository and `$(JavaSdkVersion)`, which is the default JDK that the `InstallAndroidDependencies` target requests. The 21.0.13.1 archives extract to `jdk-21.0.13.1+2`, and their `release` file reports `JAVA_VERSION="21.0.13.1"`, so the existing installed-version check keeps working with the four-part version.

The 10.0 installer gets JDK archives from the Android manifest feed and needs an exact revision match. The live feed (https://aka.ms/AndroidManifestFeed/d18-0) and the `Feeds/AndroidManifestFeed_d18.0.xml` file in android-platform-support do not list 21.0.13.1 yet, so the feed needs a separate update before `InstallAndroidDependencies` can install this version by default. Until then, the generated `WorkloadDependencies.json` keeps recommending the newest JDK 21 in the feed.

Validation, with a temporary JDK-only xaprepare scenario and a temporary `$(AndroidToolchainDirectory)`:

  * `dotnet build build-tools/xaprepare/xaprepare.sln -p:AndroidToolchainDirectory=D:\tmp\xa-jdk-validate`: succeeded.
  * xaprepare downloaded `microsoft-jdk-21.0.13.1-windows-x64.zip` and installed it from `jdk-21.0.13.1+2`. A second run reported `Microsoft OpenJDK version 21.0.13.1 already installed`. `java -version` reported `21.0.13.1+2-LTS`.
  * HTTP range reads confirmed that the linux-x64, macos-x64, and macos-aarch64 archives also extract to `jdk-21.0.13.1+2`.
  * `dotnet msbuild Configuration.props -getProperty:JavaSdkVersion`: `21.0.13.1`.
  * `GenerateWorkloadDependencies` target in `tools/workload-dependencies/WorkloadDependencies.proj`: succeeded and passed `--jdk-version=21.0.13.1`. The output had `"version": "[21.0,22.0)"` and `"recommendedVersion": "21.0.9"` from the live feed.

Co-authored-by: Copilot App <[email protected]>
jonathanpeppers added a commit that referenced this pull request Nov 20, 2026
#13631)

Keep the repository's Microsoft Build of OpenJDK 25 toolchain current with the latest 25.0.5.1 release.

Update the default JDK for `InstallAndroidDependencies` to 21.0.13.1 and add it to the workload dependency feed.

The live Android manifest feed needs a separate update to install this version on request.

Backport of #13619. The `.github/workflows/gradle-dependency-submission.yml` change is not included, because that workflow does not exist on this branch.

(cherry picked from commit dba7c0f)

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants