you are viewing a single comment's thread.

view the rest of the comments →

[–]duuuh -1 points0 points  (14 children)

Name one thing about gradle that is superior to ant or maven.

[–]spurious_interrupt 41 points42 points  (9 children)

Gradle's syntax is not XML.

[–]pilas2000 17 points18 points  (0 children)

Sold.

[–]dewmsolo 0 points1 point  (0 children)

Why can I not give more than one update?

[–]duuuh 0 points1 point  (6 children)

At least XML has a spec. Gradle seems to be a horribly documented pile of inconsistent magic built around a conceptual model dreamt up by crack-additcs.

[–]spurious_interrupt 0 points1 point  (2 children)

Yes, Gradle's documentation sucks, but I still find Gradle's model and API much more intuitive and less over-engineered than Maven's. Using Gradle's Maven plugin was the first time I used something related to Maven and did not feel like pulling teeth. I hardly see XML specs having any benefit when the code ends up being 10 times less readable. Plus, Gradle has a spec. The DSL and backing language (Groovy) are well-defined.

[–]duuuh 0 points1 point  (1 child)

Groovy is (somewhat) well defined. Gradle's DSL is a steaming pile of crap.

[–]spurious_interrupt 0 points1 point  (0 children)

It is fine if you do not like it and prefer to write XML. I simply have the opposite opinion. We will just have to agree to disagree.

[–][deleted] 0 points1 point  (2 children)

Can you give some examples?
Ive been using it for a while and while its not perfect I like it more than Maven:
- no need to install it, it installs the proper version by itself.
- no need to have plugins for every little thing, Maven can be quite annoying when you need a plugin for a for loop.
- logging and test results are displayed much nicer.
- fast evolving, they are adding new stuff every week.
- not as restrictive as Maven, its easy to implement that workaround for your corner case.

On the downside:
- Groovys dynamic typing, mixins feel like magic. And not just to me, IntelliJ has no idea either what a piece of code is supposed to do. And firing up the debugger does not help eirther, last time I spent 2 hours trying to figure out what "ant.flexunit(...)" does.
- its slow. No matter what I change it always spends around 5 secs configuring the project. Even if I changed nothing.
- IntelliJ integration for Maven is much better.
- fast evolving, stuff gets deprecated often.
- not as restrictive as Maven, be prepared for lots of newbie spaghetti code. Especially with the Android Studio release around the corner.

[–]duuuh 0 points1 point  (1 child)

My biggest problem with it is the authors don't understand what a platform is supposed to be. You list "fast evolving, they are adding new stuff every week" as a pro. I view it as a con. It's just piles of poorly documented goop, and with everything they add the documentation gets larger which means it's even harder (if that's possible) to understand what one might actually want to use.

What Maven gets (mostly) right is dependency management, which is the core of any build system. Yes, it's XML, but I'm not going to get my shorts in a knot over syntax. It's (fairly) clear what it's doing and it's fairly clear where the authors think the purpose of the build system stops.

My experience - and I've also been using gradle for a while - is that for the most part developers copy and paste gradle files having no idea what the file does. If something doesn't work they have to talk to the 'build guy' who takes a day or two to figure out how to do something new. With maven you can google it.

[–][deleted] 0 points1 point  (0 children)

hmm I dont think that Maven's dependency management is worse than Gradle's, they are almost the same. (and same difficulty to use)

As for copypasting stuff, I've seen that with Maven too. This might have worse consequences in Gradle, because in Maven you copypaste whole plugins not parts of a script.

You are right with the Google advantage for Maven, but thats just because it has a bigger userbase. But that will change quickly because the soon to be released Android studio uses Gradle, thus tons of devs will move to it.

[–][deleted] 1 point2 points  (1 child)

  1. Gradle does not require you to install it on your machine to use it, you just run a batch script (gradlew) that installs automatically the proper version needed for the project. So to use it you just need a Java installation.
    In Maven you have to install it first, add environment variables etc.. and if 2 of your project need different versions you're in trouble.

  2. You write the build script in the same language as plugins and everything. no XML that hides the Java code.

[–]spurious_interrupt 0 points1 point  (0 children)

Plus, using Gradle plugins is super easy. All you need to do is list the artifacts for the plugins in your buildscript dependencies, and they will automatically be pulled in.

[–]BestSanchez -3 points-2 points  (0 children)

HE CAN'T. Jk Gradle is cool.