Hello, Is it possible to bundle all dependencies i...
# ktor
s
Hello, Is it possible to bundle all dependencies inside a jar to be imported to another project? My multiplatform project is building the jar but when I try to run on the application it says that a class from ktor was not found. I tried to use shadow jar to make a fat jar but it bundles kotlin's runtime with it as well, which leads to plenty of errors of duplicate classes. Any solution?
g
Shadow plugin has DSL to exclude dependencies from bundling (also it's possible to repack/rename packages)
s
Thank you will give that a go
y
I spent a huge amount of time trying to make this work... you may want to check my build file https://github.com/ypujante/jamba-quickstart-server/blob/master/build.gradle
s
Thank you for your answer but it still compiles kotlin's runtime with it which is not what I intend. This jar is to be imported to android kotlin applications so kotlin's runtime is useless there and gives me plenty of errors.
image.png