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
15 changed files with 4218 additions and 3568 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);
}
}