Add support for multiple jdks (#368)

This commit is contained in:
Dmitry Shibanov 2022-09-08 15:26:54 +02:00 committed by GitHub
parent 749e4491fa
commit d854b6da19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 4219 additions and 3569 deletions

View file

@ -142,10 +142,12 @@ export abstract class JavaBase {
}
protected setJavaDefault(version: string, toolPath: string) {
const majorVerssion = version.split('.')[0];
core.exportVariable('JAVA_HOME', toolPath);
core.addPath(path.join(toolPath, 'bin'));
core.setOutput('distribution', this.distribution);
core.setOutput('path', toolPath);
core.setOutput('version', version);
core.exportVariable(`JAVA_HOME_${majorVerssion}_${this.architecture.toUpperCase()}`, toolPath);
}
}