Hey guys, I'm not sure if this is a Ktor issue, a ...
# ktor
m
Hey guys, I'm not sure if this is a Ktor issue, a gradle issue or a Kotlin multiplatform issue, however, it's a fullstack web app project generated by IntelliJ. The way to reproduce the issue is as follows: 1. Have IntelliJ Ultimate installed (newest version up until today) 2. Generate a Kotlin multiplatform project (Ktor backend, Kotlin/JS frontend) 3. Run the
build
Gradle task. 4. Watch the folder
build/libs/
. The
.jar
files get generated. Watch their size. 5. Go back to step 3. Doing this a couple of times causes the .jars to be exponentially large for some reason. I don't know why!
🤣 1
a
I can reproduce it without Ktor dependencies and IntelliJ IDEA so please file an issue here.
m
Damn, how come I'm the first one to find out about this? Is there so little people using Kotlin multiplatform?
b
I guess you might say that your fat jars are getting "fatter" 😀
But people normally don't pay much attention to build outputs when developing and production binaries are built on ci in a clean environment. Explains why nobody noticed it yet!
m
@Big Chungus yeah but that doesn't make sense to me. The jar gets fatter and fatter, exponentially! After a couple builds, the fat jar is like 10 gigabytes, maybe even more. Also isn't this like one of the main ways of deploying my Kotlin webserver? Like... If there are other people also using Kotlin multiplatform for deploying their servers, all of them are building fat jars, aren't they? I'm starting to doubt my decision of writing my web app in Kotlin if a flaw in such an important part of the development process went completely unnoticed :(