mirror of
https://github.com/actions/setup-java.git
synced 2025-09-10 12:37:08 +00:00
Merge 3baf0d146a
into d0351b4837
This commit is contained in:
commit
878fe42df3
8 changed files with 30 additions and 29 deletions
|
@ -18,6 +18,13 @@ The `setup-java` action provides the following functionality for GitHub Actions
|
||||||
|
|
||||||
This action allows you to work with Java and Scala projects.
|
This action allows you to work with Java and Scala projects.
|
||||||
|
|
||||||
|
## Breaking changes in V5
|
||||||
|
|
||||||
|
- Upgraded action from node20 to node24
|
||||||
|
> Make sure your runner is on version v2.327.1 or later to ensure compatibility with this release [Release Notes](https://github.com/actions/runner/releases/tag/v2.327.1)
|
||||||
|
|
||||||
|
For more details, see the full release notes on the [releases page](https://github.com/actions/setup-java/releases/tag/v5.0.0)
|
||||||
|
|
||||||
## V2 vs V1
|
## V2 vs V1
|
||||||
|
|
||||||
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
|
- V2 supports custom distributions and provides support for Azul Zulu OpenJDK, Eclipse Temurin and AdoptOpenJDK out of the box. V1 supports only Azul Zulu OpenJDK.
|
||||||
|
|
|
@ -150,9 +150,8 @@ describe('getAvailableVersions', () => {
|
||||||
});
|
});
|
||||||
mockPlatform(distribution, platform);
|
mockPlatform(distribution, platform);
|
||||||
|
|
||||||
const availableVersion = await distribution['findPackageForDownload'](
|
const availableVersion =
|
||||||
version
|
await distribution['findPackageForDownload'](version);
|
||||||
);
|
|
||||||
expect(availableVersion).not.toBeNull();
|
expect(availableVersion).not.toBeNull();
|
||||||
expect(availableVersion.url).toBe(expectedLink);
|
expect(availableVersion.url).toBe(expectedLink);
|
||||||
});
|
});
|
||||||
|
@ -222,9 +221,8 @@ describe('getAvailableVersions', () => {
|
||||||
|
|
||||||
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
|
const expectedLink = `https://corretto.aws/downloads/resources/17.0.2.8.1/amazon-corretto-17.0.2.8.1-macosx-${distroArch}.tar.gz`;
|
||||||
|
|
||||||
const availableVersion = await distribution['findPackageForDownload'](
|
const availableVersion =
|
||||||
'17'
|
await distribution['findPackageForDownload']('17');
|
||||||
);
|
|
||||||
expect(availableVersion).not.toBeNull();
|
expect(availableVersion).not.toBeNull();
|
||||||
expect(availableVersion.url).toBe(expectedLink);
|
expect(availableVersion.url).toBe(expectedLink);
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,9 +206,8 @@ describe('getAvailableVersions', () => {
|
||||||
});
|
});
|
||||||
mockPlatform(distribution, platform);
|
mockPlatform(distribution, platform);
|
||||||
|
|
||||||
const availableVersion = await distribution['findPackageForDownload'](
|
const availableVersion =
|
||||||
jdkVersion
|
await distribution['findPackageForDownload'](jdkVersion);
|
||||||
);
|
|
||||||
expect(availableVersion).not.toBeNull();
|
expect(availableVersion).not.toBeNull();
|
||||||
expect(availableVersion.url).toBe(expectedLink);
|
expect(availableVersion.url).toBe(expectedLink);
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,9 +76,8 @@ describe('findPackageForDownload', () => {
|
||||||
checkLatest: false
|
checkLatest: false
|
||||||
});
|
});
|
||||||
distribution['getAvailableVersions'] = async () => manifestData as any;
|
distribution['getAvailableVersions'] = async () => manifestData as any;
|
||||||
const resolvedVersion = await distribution['findPackageForDownload'](
|
const resolvedVersion =
|
||||||
input
|
await distribution['findPackageForDownload'](input);
|
||||||
);
|
|
||||||
const url = resolvedVersion.url;
|
const url = resolvedVersion.url;
|
||||||
const options = {method: 'HEAD'};
|
const options = {method: 'HEAD'};
|
||||||
|
|
||||||
|
|
|
@ -61,9 +61,8 @@ describe('getAvailableVersions', () => {
|
||||||
|
|
||||||
mockPlatform(distribution, 'linux');
|
mockPlatform(distribution, 'linux');
|
||||||
|
|
||||||
const availableVersion = await distribution['findPackageForDownload'](
|
const availableVersion =
|
||||||
version
|
await distribution['findPackageForDownload'](version);
|
||||||
);
|
|
||||||
expect(availableVersion).not.toBeNull();
|
expect(availableVersion).not.toBeNull();
|
||||||
expect(availableVersion.url).toBe(
|
expect(availableVersion.url).toBe(
|
||||||
'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz'
|
'https://github.com/SAP/SapMachine/releases/download/sapmachine-17.0.10/sapmachine-jdk-17.0.10_linux-x64_bin.tar.gz'
|
||||||
|
@ -230,9 +229,8 @@ describe('getAvailableVersions', () => {
|
||||||
});
|
});
|
||||||
mockPlatform(distribution, platform);
|
mockPlatform(distribution, platform);
|
||||||
|
|
||||||
const availableVersion = await distribution['findPackageForDownload'](
|
const availableVersion =
|
||||||
normalizedVersion
|
await distribution['findPackageForDownload'](normalizedVersion);
|
||||||
);
|
|
||||||
expect(availableVersion).not.toBeNull();
|
expect(availableVersion).not.toBeNull();
|
||||||
expect(availableVersion.url).toBe(expectedLink);
|
expect(availableVersion.url).toBe(expectedLink);
|
||||||
}
|
}
|
||||||
|
|
13
package-lock.json
generated
13
package-lock.json
generated
|
@ -32,7 +32,7 @@
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^29.7.0",
|
"jest-circus": "^29.7.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^3.6.2",
|
||||||
"ts-jest": "^29.3.0",
|
"ts-jest": "^29.3.0",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
|
@ -4876,15 +4876,16 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.6.2",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin-prettier.js"
|
"prettier": "bin/prettier.cjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "setup java action",
|
"description": "setup java action",
|
||||||
"main": "dist/setup/index.js",
|
"main": "dist/setup/index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=24.0.0"
|
"node": ">=24.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
"eslint-plugin-node": "^11.1.0",
|
"eslint-plugin-node": "^11.1.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"jest-circus": "^29.7.0",
|
"jest-circus": "^29.7.0",
|
||||||
"prettier": "^2.8.4",
|
"prettier": "^3.6.2",
|
||||||
"ts-jest": "^29.3.0",
|
"ts-jest": "^29.3.0",
|
||||||
"typescript": "^5.3.3"
|
"typescript": "^5.3.3"
|
||||||
},
|
},
|
||||||
|
|
|
@ -59,9 +59,8 @@ export async function createToolchainsSettings({
|
||||||
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
// when an alternate m2 location is specified use only that location (no .m2 directory)
|
||||||
// otherwise use the home/.m2/ path
|
// otherwise use the home/.m2/ path
|
||||||
await io.mkdirP(settingsDirectory);
|
await io.mkdirP(settingsDirectory);
|
||||||
const originalToolchains = await readExistingToolchainsFile(
|
const originalToolchains =
|
||||||
settingsDirectory
|
await readExistingToolchainsFile(settingsDirectory);
|
||||||
);
|
|
||||||
const updatedToolchains = generateToolchainDefinition(
|
const updatedToolchains = generateToolchainDefinition(
|
||||||
originalToolchains,
|
originalToolchains,
|
||||||
jdkInfo.version,
|
jdkInfo.version,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue