mainpostsannouncesoft/projmiscstorage

eeeeww, gradle

2021/08/10 5:47 AM (UTC -5) | tildearrow

the build system that eats up your RAM, does not work without stdin and has massive version incompatibility (thankfully a wrapper used by 99% of projects mitigates this).

why the Maven hate? what's wrong with it?
I've used Maven for a long time and didn't have any problems with it...
my only complaint is the inability to provide dependency-specific repositories to reduce number of requests and speed up dependency updating...

but Gradle?... no, thanks. here is why.

daemon that eats up your RAM

Gradle creates a daemon (read background task) in order to perform compilation and "speed it up". but the same thing can be done with Maven, at the same speed, without any daemon or whatever. so what's the point?
even worse, the daemon is written in Java and by default has a large heap space (hence more memory usage) and is incompatible with other Gradle versions and even terminals!
good luck working with multiple Gradle projects at the same time, because two or three instances are enough to exhaust my 16GB RAM system and slow it down!
not only that, the darn thing isn't OOM-killer-aware, so it doesn't set its own OOM score to the lowest (to be killed first) and doesn't suicide under memory pressure... and also, it doesn't quit at all even after hours of idling!

yeah, let's use Maven repositories on Gradle!

yes. Gradle has the ability to use freaking Maven repositories. that's like if the PlayStation were able to play Xbox games. that would never happen...
so why not just use Maven after all?

convoluted configuration like Autotools

to use Gradle you have to create up to three files: build.gradle, gradle.properties and settings.gradle (or settings.gradle.kts which gives you some Kotlin in a configuration file, as weird as that sounds).
also, the wrapper files: gradlew and gradlew.bat.

on the other hand, Maven only requires a single file to work: pom.xml. yes, I know it's the ugly XML, but still...

you cannot run it in the background

Gradle demands that you have standard input (stdin) in order to work. one day I tried putting Gradle as a background job (Ctrl-Z and then bg), and it refused to.
Maven worked fine.

also, even if Gradle were to implement background mode, it wouldn't work too well as it doesn't use a log-style presentation but instead displays daemon status like a few ticker boards...

doesn't work under weird terminal types

if you have installed ncurses5-compat-libs and/or not use termcap (e.g. Arch Linux unsets it for being "outdated, old and crusty"), Gradle will refuse to do any work and die with the following message:

Could not open terminal for stdout: Could not get termcap entry

who cares about the termcap entry just WORK ALREADY!
Maven doesn't care, and it works fine. why is this so important for a build to proceed?!

so many copies of Gradle! one per project, pretty much!

Gradle versions are pretty much incompatible.
if you create a project with Gradle version X, don't expect it to work on version X+1.
as a solution to the problem, the Gradle wrapper was created, which is a small script that downloads the respective version of Gradle for you.
but then you end with a thousand copies of Gradle...

conclusion

use Maven.

-------------------------------------------------
BUILD SUCCESS
-------------------------------------------------
Total time: 250.0s
Finished at: 3000-01-01T00:00:00+00:00
-------------------------------------------------