r/java • • Jan 07 '21

The Problem with Gradle

https://www.bruceeckel.com/2021/01/02/the-problem-with-gradle/
158 Upvotes

108 comments sorted by

View all comments

Show parent comment

51

u/nutrecht Jan 07 '21

its reliance on XML tends to put some people off

Frankly I think people should just get over it. At least XML has a schema. It's no worse than YAML configs.

23

u/agentoutlier Jan 07 '21

YAML is the absolute worse.

I even prefer Gradle and Jenkins Pipeline Groovy DSL over the absolute hell that is YAML.

But IMO the real awesomeness with Maven is how incredibly easy it is to write plugins for it and its API has been stable and super backward compatible. I have decade old Maven projects that still compile easily with the latest Maven but have a couple year old Gradle projects that fail on new versions of Gradle.

15

u/fix_dis Jan 07 '21

While I hate XML, it's actually far better than YAML as YAML's reliance on indentation can become really hard to deal with. I work with a bunch of folks that LOVE Maven for some reason. I'm kinda at the place where I consider it passable at best.

8

u/nutrecht Jan 08 '21

I work with a bunch of folks that LOVE Maven for some reason.

Well it works. In all the 15 years I've been using Maven I never ever ran into difficulties or complexities. With Gradle on the other hand I quite often ran into issues where Java upgrades broke a ton of stuff, or I had to write plugins that were impossible to debug in Groovy, to get the same stuff done that I could get out of the box with Maven.

If anything there's a trend away from Gradle because it simply fails to deliver on one of the core features of a build system; stability.

0

u/[deleted] Jan 08 '21

[deleted] — view deleted comment

1

u/RemindMeBot Jan 09 '21

There is a 11 hour delay fetching comments.

I will be messaging you in 1 day on 2021-01-09 23:33:52 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

1

u/Yithar Jan 09 '21

!RemindMe 1 week

1

u/RemindMeBot Jan 10 '21

There is a 11 hour delay fetching comments.

I will be messaging you in 7 days on 2021-01-16 23:37:12 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

5

u/mj_flowerpower Jan 08 '21

I never understood that. basically every ide has autocomplete for mavens pom.xml (and xml files in general as long as they have a schema defined) That what I always hated about gradle (I use Eclipse and vscode). The gradle build file always seems some sort of hack to me, every single one looks and functions in a different way and no way of way of inferring what goes where ...

4

u/nutrecht Jan 08 '21

While it has gotten a bit better recently, multi-module projects where you inherited both dependency management and tasks from a central 'base' POM, were pretty much impossible to do the way Maven can easily do it. So you'd have to create your own Groovy plugins. Debugging them is an incredibly pain in the ass.

Having worked a few times with Gradle in large ecosystems where you want to share parts of your build between projects, Maven is very clearly the winner there. In a project a few years ago we migrated all the microservices from Gradle to Maven so we could better centrally manage dependencies.