mirror of
https://gitea.com/actions/setup-java.git
synced 2026-07-09 19:22:05 +08:00
Rename jdkFile input to jdk-file with deprecated alias (#1083)
* Rename jdkFile input to jdk-file with deprecated alias Add a standardized `jdk-file` input to match the lowercase-dash naming used by every other action input. The camelCase `jdkFile` input is kept as a deprecated alias: it still works, but emits a deprecation warning and may be removed in a future release. `jdk-file` takes precedence when both are provided. Updates docs and the local-file e2e workflow (one case intentionally keeps using the deprecated alias for coverage) and regenerates the dist bundles. Fixes #1077 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> * docs: keep jdkFile in switching-to-v2 guide The switching-to-v2 migration guide uses actions/setup-java@v2, which only supports the camelCase jdkFile input. Keep the new jdk-file spelling in current-version docs only. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
13
dist/setup/index.js
vendored
13
dist/setup/index.js
vendored
@@ -73279,7 +73279,8 @@ const INPUT_JAVA_VERSION_FILE = 'java-version-file';
|
||||
const INPUT_ARCHITECTURE = 'architecture';
|
||||
const INPUT_JAVA_PACKAGE = 'java-package';
|
||||
const INPUT_DISTRIBUTION = 'distribution';
|
||||
const INPUT_JDK_FILE = 'jdkFile';
|
||||
const INPUT_JDK_FILE = 'jdk-file';
|
||||
const INPUT_JDK_FILE_DEPRECATED = 'jdkFile';
|
||||
const INPUT_CHECK_LATEST = 'check-latest';
|
||||
const INPUT_SET_DEFAULT = 'set-default';
|
||||
const INPUT_VERIFY_SIGNATURE = 'verify-signature';
|
||||
@@ -133513,7 +133514,7 @@ async function run() {
|
||||
const versionFile = getInput(INPUT_JAVA_VERSION_FILE);
|
||||
const architecture = getInput(INPUT_ARCHITECTURE);
|
||||
const packageType = getInput(INPUT_JAVA_PACKAGE);
|
||||
const jdkFile = getInput(INPUT_JDK_FILE);
|
||||
const jdkFile = getJdkFileInput();
|
||||
const cache = getInput(INPUT_CACHE);
|
||||
const cacheDependencyPath = getInput(INPUT_CACHE_DEPENDENCY_PATH);
|
||||
const checkLatest = util_getBooleanInput(INPUT_CHECK_LATEST, false);
|
||||
@@ -133591,6 +133592,14 @@ async function run() {
|
||||
}
|
||||
}
|
||||
run();
|
||||
function getJdkFileInput() {
|
||||
const jdkFile = getInput(INPUT_JDK_FILE);
|
||||
const deprecatedJdkFile = getInput(INPUT_JDK_FILE_DEPRECATED);
|
||||
if (deprecatedJdkFile) {
|
||||
warning(`The '${INPUT_JDK_FILE_DEPRECATED}' input is deprecated and may be removed in a future release. Please use '${INPUT_JDK_FILE}' instead.`);
|
||||
}
|
||||
return jdkFile || deprecatedJdkFile;
|
||||
}
|
||||
async function installVersion(version, options, toolchainId = 0) {
|
||||
const { distributionName, jdkFile, architecture, packageType, checkLatest, setDefault, verifySignature, verifySignaturePublicKey, toolchainIds } = options;
|
||||
const installerOptions = {
|
||||
|
||||
Reference in New Issue
Block a user