Buildr vs Gradle, pros and cons? [closed]
Asked Answered
E

3

35

Have somebody use both Buildr and Gradle and can make comparison of this build tools. From first look they are very similar. But what to choose. And also it is good to hear about Scala support and various IDE integration(IDEA, NetBeans, Eclipse).

Thanks.

Enosis answered 14/8, 2011 at 10:3 Comment(0)
A
19

I have tried using, both and I'd definitely recommend Gradle. While both of them have pretty much the same expressiveness, I found Gradle to be much more stable (since version 1.0), less effort to install, and better documented. Although Buildr is undoubtedly a great effort, at the moment Gradle is much more professionally made.

The only problem I faced with Gradle is lack of native support for reusing ivy.xml (and ivysettings.xml), despite the fact that Gradle actually uses Ivy as its dependency engine. This feature has been promised for sometime in the future soon. Buildr, on the other hand has a ready-to-use plugin for that (it's not very configurable though).

If you need to migrate from Maven, I'd do some investigation on both tools and their support for the features you need. For new projects I'd recommend Gradle.

Neither have good support for Eclipse, but Gradle have a work-in-progress Eclipse plugin that works very much like the Ant plugin. Also, Gradle's generation of Eclipse settings files is highly customizable, so that's another way to integrate it with Eclipse.

Artair answered 15/8, 2011 at 0:15 Comment(1)
I would think that IDE integration is definitely a killer for most people. Personally, I want the same compiler building my files in the IDE as it is when running anywhere else (like a build server).Rotz
F
7

I looked at both gradle and buildr and went for buildr in the end because of one huge disadvantage with gradle: start-up time of the build system. buildr is much snappier and gave me much faster incremental builds. Performance is something I found almost unbearable with gradle. Just consider how many times a build system is kicked off and add up the constant overhead.

BTW I found the build server with both build systems (buildr and gradle) to be not very useful and error prone (that is: I spent more time with troubleshooting than it actually sped up things).

Ferrel answered 18/8, 2011 at 10:19 Comment(2)
While I somewhat agree that startup time is slower in gradle, gradle has a lot of built-in logic not to do tasks it has already done. I found that the UP-TO-DATE 'feature' is very strong and simple to make work even with custom tasks. Also, I believe that because gradle is still in milestone-land, they are still working out kinks with the functionality. They might be approaching the project with the philosophy of 'Make it work, make it right, then make it fast'. Which means it is only time before gradle becomes not only functional but fast as well.Jarv
The Gradle daemon eliminates startup overhead and makes Gradle much more snappy.Purport
E
6

See if this helps (probably outdated): http://www.tikalk.com/alm/blog/buildr-vs-gradle

If compared to BuildR, I'd recommend Gradle: 1. Groovy is much more "native" to the JVM ecosystem than Ruby. Even if you use JRuby, you'd still need to install a lot of gems 2. BuildR's development is crawling. They have not added new features in a long time

Having said that, I'd question using either one of these: With the power to script any task comes the risk that the build will have a lot of logic that people need to learn before being able to maintain it. Since this is not the main logic of the product, you have the risk of people that do not want to maintain the build or worse, doing it in copy&paste way that is not right (e.g., performance wise). With Maven, there's no logic in the pom. Also, using Gradle/BuildR means that to build the product, one needs to install Gradle/BuildR. Maven is much more standard here.

Extinctive answered 14/8, 2011 at 11:25 Comment(4)
Thanks for your answer. Yes I use maven a lot, but think it is too verbose and dont flexible. But I also worry about what you said about scripting build tools, but want to try Buildr or Gradle for my toy project.Enosis
You don't even need to install Gradle manually; instead, you can use the Gradle Wrapper, which bootstraps Gradle automatically (also on your CI machines).Purport
I disagree that you suggest using maven over gradle. I have used both in the past and I cannot be happier with switching to gradle. Now I have flexible builds and shorter build scripts. It's a win-win situation. We also have a lot less copy-paste duplication as well with gradle.Jarv
If your build is nontrivial you need to write your own maven plugins when using maven (and if it's trivial, then maintainability isn't a problem). And good luck on trying to sell that over scripting for maintainability.Hame

© 2022 - 2024 — McMap. All rights reserved.