clikt icon indicating copy to clipboard operation
clikt copied to clipboard

Cannot build native image using GraalVM for CliktCommand

Open nkiesel opened this issue 10 months ago • 1 comments

Building my app that uses Clikt as a native image with $GRAALVM_HOME/bin/native-image results in

Exception in thread "main" java.util.ServiceConfigurationError: com.github.ajalt.mordant.terminal.TerminalInterfaceProvider: Provider com.github.ajalt.mordant.terminal.terminalinterface.jna.TerminalInterfaceProviderJna not found

I avoid this for now by using CoreCliktCommand

nkiesel avatar Apr 17 '25 17:04 nkiesel

You should be able to build with graal if you exclude the transitive com.github.ajalt.mordant:mordant-jvm-jna and com.github.ajalt.mordant:mordant-jvm-graal-ffi dependencies. That will leave the graal Mordant module.

ajalt avatar Apr 17 '25 19:04 ajalt