mirror of
https://github.com/actions/setup-java.git
synced 2026-08-02 16:32:57 +00:00
Support Temurin JDKs with JMOD files (#1149)
* Initial plan * Add Temurin JMOD installation support * Rebuild action bundles * Use java-package for Temurin JMODs Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e7d8c581-2d14-4ccc-aeca-afc0f3b0c2bc * Fix Temurin JMOD test paths on Windows Use platform-aware path construction for the JMOD copy and cache assertions so the Windows test expects backslash-normalized paths. Co-authored-by: Copilot <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 <223556219+Copilot@users.noreply.github.com> Copilot-Session: e7d8c581-2d14-4ccc-aeca-afc0f3b0c2bc
This commit is contained in:
@@ -50,6 +50,15 @@ export function getJavaDistribution(
|
||||
installerOptions: JavaInstallerOptions,
|
||||
jdkFile?: string
|
||||
): JavaBase | null {
|
||||
if (
|
||||
installerOptions.packageType === 'jdk+jmods' &&
|
||||
distributionName !== JavaDistribution.Temurin
|
||||
) {
|
||||
throw new Error(
|
||||
"java-package 'jdk+jmods' is only supported for distribution 'temurin'."
|
||||
);
|
||||
}
|
||||
|
||||
switch (distributionName) {
|
||||
case JavaDistribution.JdkFile:
|
||||
return new LocalDistribution(installerOptions, jdkFile);
|
||||
|
||||
Reference in New Issue
Block a user