( version: string, distributionName: string, jdkHome: string, toolchainId?: string )
| 16 | } |
| 17 | |
| 18 | export async function configureToolchains( |
| 19 | version: string, |
| 20 | distributionName: string, |
| 21 | jdkHome: string, |
| 22 | toolchainId?: string |
| 23 | ) { |
| 24 | const vendor = |
| 25 | core.getInput(constants.INPUT_MVN_TOOLCHAIN_VENDOR) || distributionName; |
| 26 | const id = toolchainId || `${vendor}_${version}`; |
| 27 | const settingsDirectory = |
| 28 | core.getInput(constants.INPUT_SETTINGS_PATH) || |
| 29 | path.join(os.homedir(), constants.M2_DIR); |
| 30 | const overwriteSettings = getBooleanInput( |
| 31 | constants.INPUT_OVERWRITE_SETTINGS, |
| 32 | true |
| 33 | ); |
| 34 | |
| 35 | await createToolchainsSettings({ |
| 36 | jdkInfo: { |
| 37 | version, |
| 38 | vendor, |
| 39 | id, |
| 40 | jdkHome |
| 41 | }, |
| 42 | settingsDirectory, |
| 43 | overwriteSettings |
| 44 | }); |
| 45 | } |
| 46 | |
| 47 | export async function createToolchainsSettings({ |
| 48 | jdkInfo, |
nothing calls this directly
no test coverage detected