Skip to content

fix(jlink): drop jdk.jlink from includeAllModules runtime images (#673) - #682

Merged
kdroidFilter merged 1 commit into
nucleus-2.6from
fix/673-drop-jdk-jlink
Sep 17, 2026
Merged

kdroidFilter merged 1 commit into
nucleus-2.6from
fix/673-drop-jdk-jlink

Conversation

@kdroidFilter

Copy link
Copy Markdown
Collaborator

Fixes #673 (close by hand after merge: the base is nucleus-2.6, not the default branch).

Problem

On a JEP 493 JDK (Temurin 24+ and other builds without jmods/), jlink refuses to emit an image containing jdk.jlink:

Error: This JDK does not contain packaged modules and cannot be used
to create another image with the jdk.jlink module

nativeDistributions.includeAllModules = true copied java --list-modules verbatim, which includes jdk.jlink.

Fix

AbstractJLinkTask filters jdk.jlink out of the module list before --add-modules. A shipped app never needs jlink. The default module list never contained it, so default packaging is unchanged.

Verification

  • Plugin compileKotlin and ktlintCheck pass on JDK 21.
  • Detekt reports the same pre-existing findings as before; nothing new on the changed file.
  • Not exercised end to end against a Temurin 24+ JDK (none installed locally).

JEP 493 JDKs (Temurin 24+ and other builds without jmods/) refuse to
link an image that contains jdk.jlink. includeAllModules copied
`java --list-modules` verbatim, which includes it. A shipped app never
needs jlink, so filter it out before --add-modules. The default module
list never contained it, so default packaging is unchanged.
@kdroidFilter
kdroidFilter merged commit dae095c into nucleus-2.6 Sep 17, 2026
4 checks passed
@kdroidFilter
kdroidFilter deleted the fix/673-drop-jdk-jlink branch September 18, 2026 05:59
@kdroidFilter kdroidFilter mentioned this pull request Sep 18, 2026
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.

1 participant