HI all, running into a problem with mid-sized mult...
# ktor
b
HI all, running into a problem with mid-sized multi-module gradle project. We have everything in 1 repo, 6 or so ktor applications depending on 4 common modules. The issue I have is the fatjar / shadowjar outputs are ending up huge, 180mb or so. I can't seem to track down the root issue, but I'm assuming I'm incorrectly using gradle dependency imports. Everything is at "implementation" level, but I can't find a good reference example with a similar complexity to see whether this is correct.
s
180mb is chunky, but not outside the realm of possibility if you have a decent sized application with lots of dependencies. A
jar
is just a zip file, so you can always open it up and have a look inside if you’re curious about what’s taking up the space.
“implementation” is the correct dependency configuration to use for dependencies of the application modules 👍.
b
I've looked into it, but I then see all sorts of classes than I'm not expecting, eg. jetbrains.kotlin classes, things from the embedded kotlin compiler etc.
unsure what is normal
s
That sounds normal to me, since you said it’s a fat jar. A fat jar is designed to be standalone: it contains your code and all of its dependencies (and all of their dependencies, and so on). For a Kotlin project, that always includes the Kotlin standard library.
b
ok, thanks Sam