[Solved] Extension functions not available when exported to JAR

Hello Kotlin community, I have a problem with exporting my projects API into a JAR in that all extension functions are not resolved when using said JAR in another project. I am including all the compiled .class files inside the API JAR, I’ve taken a look inside the artifact to confirm that the corresponding .class file is in there but still no idea why I can’t use it when I include the JAR as a dependency.

This is the project in question: GitHub - waicool20/SKrypton: A browser automation library that uses SikuliX and doesn't grab your mouse

Help is appreciated thanks


For example in the Quick Start code snippet in the README utilizes an extension function screen on SKryptonApp
The fresh project can resolve SKryptonApp but not screen, it is defined here: SKrypton/SKryptonScreen.kt at master · waicool20/SKrypton · GitHub

It looks like the metadata from *.kotlin_module file is lost during shadowing. Could you check it is in the resulting jar? If not, you may need to tweak some settings of shadowJar

I included the *.kotlin_module files in the jar and it works now, thanks!