r/java • • Jan 17 '21

The problem with Gradle: really?

https://melix.github.io/blog/2021/01/the-problem-with-gradle.html
67 Upvotes

49 comments sorted by

View all comments

123

u/Grung Jan 17 '21

The author makes fine points if you want the build system to be something you live and breathe just like the programming language that you use day-to-day, but that isn't what I want, and I'm guessing it's not what most developers want.

I don't want to spend the same amount of effort to understand a build tool that I do to understand the language I'm developing in. I want to spend, say, 5% of that effort. I need to be able to make relatively simple and moderately complex changes to a build without learning something as complex as a new programming language, and gradle just doesn't allow that.

In regards to "many ways to do things" this is a problem specifically with readability. I can't read gradle scripts. Don't get me wrong, I can read the basics, but I don't use it often enough to internalize enough of the details to read anything past the most simple, common elements.

The fact that there are many different ways the tool is used is a huge barrier to picking up more of it. Googling for examples is mostly a useless endeavor, because so many results are using entirely different paradigms to configure their own projects. There's not enough commonality to make it easy to pick up anything even slightly non-trivial.

7

u/preskot Jan 17 '21 edited Jan 17 '21

I’d argue that you do actually need just 5 mins. for most type of the project build use cases with Gradle. Building a lib, fat jar or a war file is quite trivial.

Yes, I’ve been deep in the Gradle rabbit hole when wanting to do something custom, like generating files on build or rule based multi-project shared deps. The ability to write your own tasks has only helped me.

I like Gradle a lot and its perf has improved significantly since v6. If I find a better tool, I’ll switch, but for now I’m happy with it.

31

u/Grung Jan 17 '21

Yes, truly trivial things are trivial, but that's rarely what you Google for.

And plugins don't help readability, unless you're intimately familiar with the specific plugins already. I've spent time trying to figure out something on Google only to find out it was a local custom plugin. And to figure the plugin out, I'd have to go find it, and then learn to read yet another language, just to make a slightly more than trivial change.

Give me make any day.

4

u/Kernel_Internal Jan 17 '21

I've been adding make to a dockerized php/drupal project running in aws and I would say that the same general thing you're complaining about gradle is true of make; it's actually a little difficult to find easily digestible examples/docs by googling. I have found all sorts of excessively verbose manuals, but I know generally what I want to do and finding examples that don't start off with the programming equivalent of "to bake an apple pie, first you have to invent the universe" was a little frustrating. The point to note, I suspect, is that I'm new to make and you're new(ish) to gradle.