Add Microsoft OpenJDK 25.0.5.0.2 support (#1320)

* Initial plan

* Support Microsoft OpenJDK 25.0.5.0.2 with bundled manifest fallback

* Fix Microsoft OpenJDK version matching

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Bruno Borges <brborges@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot
2026-11-13 23:30:44 -05:00
committed by GitHub
parent a3c8068301
commit a1bf0b5568
9 changed files with 586 additions and 332 deletions

View File

@@ -8,10 +8,12 @@ import {
cacheJdkDir,
extractJdkFile,
getDownloadArchiveExtension,
normalizeJavaVersionToSemver,
renameWinArchive
} from '../../util.js';
import * as gpg from '../../gpg.js';
import {MICROSOFT_PUBLIC_KEY} from './microsoft-key.js';
import bundledVersions from './microsoft-openjdk-versions.json' with {type: 'json'};
import {SIGNATURE_VERIFICATION_FAILURE_HELP} from '../../constants.js';
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
@@ -108,7 +110,20 @@ export class MicrosoftDistributions extends JavaBase {
throw new Error('Could not load manifest for Microsoft Build of OpenJDK');
}
const foundRelease = await tc.findFromManifest(range, true, manifest, arch);
const findMatchingRelease = async (releases: tc.IToolRelease[]) => {
const matchingReleases = releases
.map(release => ({
...release,
version: normalizeJavaVersionToSemver(release.version)
}))
.filter(release => this.isVersionSatisfied(range, release.version));
return tc.findFromManifest(range, true, matchingReleases, arch);
};
const foundRelease =
(await findMatchingRelease(manifest)) ??
(await findMatchingRelease(bundledVersions));
if (!foundRelease) {
const availableVersionStrings = manifest.map(item => item.version);