Skip to content

dist: Support Liberica NIK (#878)#1112

Open
asm0dey wants to merge 1 commit into
actions:mainfrom
asm0dey:support-liberica-nik
Open

dist: Support Liberica NIK (#878)#1112
asm0dey wants to merge 1 commit into
actions:mainfrom
asm0dey:support-liberica-nik

Conversation

@asm0dey

@asm0dey asm0dey commented Jul 13, 2026

Copy link
Copy Markdown

Description:

Adds a new distribution liberica-nik for the Liberica Native Image Kit (NIK), BellSoft's GraalVM-based build. It reuses the same download/extract mechanics as the existing liberica distribution but resolves releases through the Bell-SW /v1/nik/releases API.

Just like liberica (regular vs. JavaFX), both NIK flavors are supported via java-package:

  • java-package: jdk (default) — the standard NIK bundle (native-image + extra languages), no JavaFX.
  • java-package: jdk+fx — the full NIK bundle, which adds JavaFX support.
- uses: actions/setup-java@v5
  with:
    distribution: 'liberica-nik'
    java-version: '25'
    java-package: jdk # optional (jdk or jdk+fx) - defaults to jdk
- run: native-image --version

Design notes:

  • Version resolution matches the embedded JDK version, not NIK's own GraalVM version. Each NIK release carries a top-level GraalVM version (e.g. 24.1.0) plus a components array; the embedded liberica component holds the JDK version (e.g. 21.0.4). java-version matches the latter, so java-version: 21 behaves the same as for every other distribution.
  • Supported on Linux, macOS and Windows for x64 and aarch64 (NIK ships 64-bit only).

Changes:

  • src/distributions/liberica-nik/{installer,models}.ts — new distribution.
  • src/distributions/distribution-factory.ts — register liberica-nik.
  • __tests__/distributors/liberica-nik-installer.test.ts + __tests__/data/liberica-nik.json — unit tests (URL building, arch/platform mapping, version resolution, SemVer normalization).
  • README.md, docs/advanced-usage.md — documentation.
  • .github/workflows/e2e-versions.yml — e2e coverage (11/17/21/25 across OSes, plus a jdk+fx case).
  • dist/ — rebuilt via npm run build.

Related issue:

Closes #878

Download URL:

Releases are resolved via the Bell-SW API: https://api.bell-sw.com/v1/nik/releases
Downloads page: https://bell-sw.com/pages/downloads/native-image-kit/

License:

Liberica Native Image Kit EULA

Check list:

  • Ran npm run check locally (format, lint, build, test) and all checks pass.
  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.
  • Mark if new distribution is being added.

AI Disclosure: This PR was prepared with the assistance of Claude Code (Anthropic). The distribution implementation, tests, documentation, and e2e configuration were AI-assisted; the design decisions (JDK-version matching, jdk/jdk+fxstandard/full bundle mapping, distribution id) were made by the human contributor, who reviewed every line before submission.

Add the `liberica-nik` distribution (Liberica Native Image Kit), a
GraalVM-based build from BELL Software resolved via the Bell-SW
`/v1/nik/releases` API.

- `java-version` matches the embedded JDK version (from the release's
  `liberica` component), consistent with every other distribution.
- `java-package: jdk` installs the `standard` bundle; `jdk+fx` installs
  the `full` bundle with JavaFX/Swing support.
- Supported on Linux, macOS and Windows for x64 and aarch64.

Signed-off-by: asm0dey <pavel.finkelshtein@gmail.com>
@asm0dey asm0dey requested a review from a team as a code owner July 13, 2026 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Liberica NIK

1 participant