Add Tencent Kona SDKMAN mapping and format sdkmanrc docs as a table

- Map SDKMAN 'kona' identifier to the 'kona' distribution (added in #672)
- Add a .sdkmanrc test case for the kona suffix
- Convert the inline SDKMAN suffix mapping in advanced-usage.md to a table
- Rebuild dist bundles

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Bruno Borges 2026-07-07 14:32:36 -04:00
parent 8c148472ea
commit a7d1de6676
5 changed files with 26 additions and 5 deletions

View File

@ -183,7 +183,8 @@ describe('getVersionFromFileContent', () => {
['java=11.0.25-sapmchn', '11.0.25', 'sapmachine'], ['java=11.0.25-sapmchn', '11.0.25', 'sapmachine'],
['java=21.0.5-jbr', '21.0.5', 'jetbrains'], ['java=21.0.5-jbr', '21.0.5', 'jetbrains'],
['java=11.0.25-sem', '11.0.25', 'semeru'], ['java=11.0.25-sem', '11.0.25', 'semeru'],
['java=17.0.13-dragonwell', '17.0.13', 'dragonwell'] ['java=17.0.13-dragonwell', '17.0.13', 'dragonwell'],
['java=21.0.5-kona', '21.0.5', 'kona']
])( ])(
'parsing %s should return version %s and distribution %s', 'parsing %s should return version %s and distribution %s',
(content: string, expectedVersion: string, expectedDist: string) => { (content: string, expectedVersion: string, expectedDist: string) => {

View File

@ -52578,7 +52578,8 @@ function mapSdkmanDistribution(sdkmanDist) {
oracle: 'oracle', oracle: 'oracle',
sapmchn: 'sapmachine', sapmchn: 'sapmachine',
jbr: 'jetbrains', jbr: 'jetbrains',
dragonwell: 'dragonwell' dragonwell: 'dragonwell',
kona: 'kona'
}; };
const mapped = distributionMap[sdkmanDist.toLowerCase()]; const mapped = distributionMap[sdkmanDist.toLowerCase()];
if (!mapped) { if (!mapped) {

3
dist/setup/index.js vendored
View File

@ -81547,7 +81547,8 @@ function mapSdkmanDistribution(sdkmanDist) {
oracle: 'oracle', oracle: 'oracle',
sapmchn: 'sapmachine', sapmchn: 'sapmachine',
jbr: 'jetbrains', jbr: 'jetbrains',
dragonwell: 'dragonwell' dragonwell: 'dragonwell',
kona: 'kona'
}; };
const mapped = distributionMap[sdkmanDist.toLowerCase()]; const mapped = distributionMap[sdkmanDist.toLowerCase()];
if (!mapped) { if (!mapped) {

View File

@ -666,7 +666,24 @@ steps:
Supported files are `.java-version`, `.tool-versions` and `.sdkmanrc`. Supported files are `.java-version`, `.tool-versions` and `.sdkmanrc`.
* In `.java-version` file, only the version should be specified (e.g., 17.0.7). The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv). * In `.java-version` file, only the version should be specified (e.g., 17.0.7). The `.java-version` file recognizes all variants of the version description according to [jenv](https://github.com/jenv/jenv).
* In `.tool-versions` file, java version should be preceded by the java keyword (e.g., java 17.0.7). The `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)). * In `.tool-versions` file, java version should be preceded by the java keyword (e.g., java 17.0.7). The `.tool-versions` file supports version specifications in accordance with [asdf](https://github.com/asdf-vm/asdf) standards, adhering to Semantic Versioning ([semver](https://semver.org/)).
* In `.sdkmanrc` file, java version should be preceded by the `java=` prefix (e.g., `java=17.0.7-tem`). When a recognized SDKMAN distribution suffix is present, setup-java can infer the `distribution` input automatically. Supported suffix mappings are: `tem` -> `temurin`, `sem` -> `semeru`, `albba`/`dragonwell` -> `dragonwell`, `zulu` -> `zulu`, `amzn` -> `corretto`, `graal`/`graalce` -> `graalvm`, `librca` -> `liberica`, `ms` -> `microsoft`, `oracle` -> `oracle`, `sapmchn` -> `sapmachine`, `jbr` -> `jetbrains`. Unrecognized suffixes require setting `distribution` explicitly. The `.sdkmanrc` file supports version specifications in accordance with [file format](https://sdkman.io/usage#env-command), see [Sdkman! documentation](https://sdkman.io/jdks) for more information. * In `.sdkmanrc` file, java version should be preceded by the `java=` prefix (e.g., `java=17.0.7-tem`). When a recognized SDKMAN distribution suffix is present, setup-java can infer the `distribution` input automatically. Unrecognized suffixes require setting `distribution` explicitly. The `.sdkmanrc` file supports version specifications in accordance with [file format](https://sdkman.io/usage#env-command), see [Sdkman! documentation](https://sdkman.io/jdks) for more information.
Supported SDKMAN suffix mappings:
| SDKMAN suffix | setup-java distribution |
| ------------- | ----------------------- |
| `tem` | `temurin` |
| `sem` | `semeru` |
| `albba`, `dragonwell` | `dragonwell` |
| `zulu` | `zulu` |
| `amzn` | `corretto` |
| `graal`, `graalce` | `graalvm` |
| `librca` | `liberica` |
| `ms` | `microsoft` |
| `oracle` | `oracle` |
| `sapmchn` | `sapmachine` |
| `jbr` | `jetbrains` |
| `kona` | `kona` |
If both `java-version` and `java-version-file` **inputs** are provided, the `java-version` input will be used. If both `java-version` and `java-version-file` **inputs** are provided, the `java-version` input will be used.

View File

@ -222,7 +222,8 @@ function mapSdkmanDistribution(sdkmanDist: string): string | undefined {
oracle: 'oracle', oracle: 'oracle',
sapmchn: 'sapmachine', sapmchn: 'sapmachine',
jbr: 'jetbrains', jbr: 'jetbrains',
dragonwell: 'dragonwell' dragonwell: 'dragonwell',
kona: 'kona'
}; };
const mapped = distributionMap[sdkmanDist.toLowerCase()]; const mapped = distributionMap[sdkmanDist.toLowerCase()];