4 ms·
If Gradle is fast in comparison to Maven, then I cannot begin to imagine how slow Maven is. A build system that has to spawn a daemon to speed up the process is
by johnisgood 6y ago
If Gradle is fast in comparison to Maven, then I cannot begin to imagine how slow Maven is. A build system that has to spawn a daemon to speed up the process is a pretty shitty one. It takes about 2-3 minutes to do that for me, and still it takes 30 seconds to build my program which is not even that huge.
- elygre 6y agoAre you saying that it takes 2-3 minutes to start the grade daemon? That sounds weird.
- johnisgood 6y agoYeah, it does. I have 8 GB memory, and an Intel G3xxx CPU. I am baffled by how slow it is. For people who do not believe me, I am willing to record it, but I have to go to sleep now. :/
- antonyh 6y agoThat's been my experience of Gradle too. It's always been slower than Maven for me. In any case, 90% of build time is unit tests for the projects I've worked on, so switching tools offer minimal benefit in that regard.
- winrid 6y agoSomething is wrong with your setup methinks. Gradle daemon starts in a second or so for me on the two Java projects on this machine (around 20koc each) and like one second build times...
- johnisgood 6y agoWhat could possibly be wrong with the setup though that would cause it? I have a couple of dependencies, including libGDX, artemis-odb, and kotlin-stdlib-jdk8. I posted it in another comment, but I am willing to record it when my time allows. It is quite baffling. I never encountered such slow compilation times even though I compiled some C++ projects before.
- winrid 6y agoOne of my projects mentioned also uses libgdx. Have you tried the libgdx discord? The community is pretty helpful.
- johnisgood 6y agoIt is not my codebase, I had to clean it up. I managed to do it though and it basically looks like every other libGDX project. I can even create a single JAR file that works! I am pretty happy about that. Everything is up to date, and I am converting the codebase from Java to Kotlin. Still a long way to go, but we (my partner and I) will get there. :) By the way: I also use `googleJavaFormat` and `ktlint` to format both Java and Kotlin files. I also pack textures before running the game. In any case, my old hardware may be at fault here, or the fact that I also run multiple things in the background, or that I run a couple of Gradle tasks, or a combination of these things.
- The_rationalist 6y agoNit: you don't need to specify kotlin stdlib since Kotlin 1.4
- johnisgood 6y agoThank you!
- throwaway189262 6y agoWe have a 100k LoC project that builds in 15 seconds in maven and that includes packaging everything into an Uber jar. Do you have a fast SSD? It makes an enormous difference in build times
- johnisgood 6y agoI have an old Western Digital Blue hard drive. My setup is really old. It is about >5 years old.
- throwaway189262 6y agoThat's why your builds are slow I guarantee it. Our build times dropped from ~4 minutes to ~20 seconds when they got everyone machines with SSD