Is it possible to publish a Kotlin/Native c-intero...
# kotlin-native
l
Is it possible to publish a Kotlin/Native c-interop on maven by itself? If so, could you show an example? Slack Conversation
👍 1
n
Yes. You’ll need to include an empty Kotlin source file to trick the compiler into compiling a target.
easiest in the commonMain sourceset
for an example, take a look at https://github.com/Dominaezzz/kgl, specifically
kgl-glfw-static
for the compiler “hack” with empty source file, and
kgl-stb
for including a header-only library as static lib in klib
l
Thanks for the reply! I already managed to achieve that, I was wondering if there was a way to do that more gracefully
n
not at the moment. The compiler currently ignores targets with empty source roots, and there’s no way to force it not to that I know of.
😥 1
l
Damn! Well if JB is listening, PLS HALP!