Hello guy, in a Kmm project that targets JVM, how ...
# multiplatform
b
Hello guy, in a Kmm project that targets JVM, how to create a jar lib of it
j
Copy code
./gradlew packageUberJarForCurrentOS         
or
./gradlew desktopJar
l
@brabo-hi You can run the following command for creating a JVM Jar in a multiplatform project :
./gradlew :jvmJar
. It will be available in the
build/libs
directory.
b
Thank you @Loïc Lamarque working
l
Your welcome @brabo-hi.
b
@Loïc Lamarque it looks like the jar doesn't contains libraries declared as dependencies, how can i create a java that contains all it corresponding dependencies
l
This is something that I researched recently @brabo-hi. You need to create a task that will assemble a Fat JAR. I don't exactly know how to do it for a Kotlin Multiplatform project, but here's an article for the JVM platform: Creating a Fat JAR in Gradle.
🔥 1