Gradle 3.0 Release Notes
docs.gradle.org
docs.gradle.org
I contend that Groovy is the "bash" of the JVM: there may be use-cases for it, but it's so prone to becoming a minefield that you're often better off using a more fully-fledged language (one that's not so slow and doesn't aggressively hide errors from you in the name of being "dynamic")
We're (slowly) working on doing an upgrade to all our infrastructure, so one of the things we've examined is moving from Ant to Maven. While there's a lot of people that've expressed dissatisfaction with it, you can't ignore the fact that tutorials, setup instructions and such seemingly to a one are written with a pom.xml in mind.
So to that end, I wonder what place Gradle has. I've played with it a bit outside of this project and it seems nice enough and does its job, I guess I just don't understand what niche it fills that neither Ant nor Maven don't already handle?
My inner grumpy anti-hipster says it is mostly about riding the tail of the anti-xml wave though: "no xml? Then it must be good!"
If you check the developer Q&A videos at Google IO 2016, one of the issues that got discussed was precisely the slow builds.
It is also interesting that they had to re-write the public API in Java for Gradle 3, as part of their speed improvements.
IIRC the gradle daemon made things competetive if not faster, though it's been a while since I tried.
There is a recent post from the Android team, where they advise to allocate between 2 and 5 GBs for the daemon!
I don't recall it being that dire for my non-Android project, but I don't recall checking my mem usage either...
I have only recently begun using some Gradle builds after I hopped into an open source project that was using them and I'm quite impressed by the ease of it as well as the speed. You can have Gradle do a lot of the tasks you would've done with an Ant script + Maven pom. I'm already impressed with the lack of effort for sub-module builds, I've always found Maven to a pain for getting those working just right. Additionally, when you run the Gradle build daemon locally your builds are WAY faster than running Maven builds. I found the IntelliJ support for Gradle to be very good so far and I am going to continue to try converting a number of my existing projects over to Gradle as time allows.
EDIT: The main thing I really need to investigate with Gradle is what it does that is similar to a parent pom in Maven. We make pretty extensive use of parent poms in order to reduce boilerplate and keep dependency versions in sync, and we use Artifactory for everything.
EDIT2: This [0] Maven vs Gradle breakdown (though obviously pro-Gradle) highlights some areas where Gradle could really make a difference for people.
Check out this project for an example of how that works: https://github.com/JakeWharton/butterknife
So in most maven projects, the parent POM is a kitchen sink.
Gradle allows to create separate shared ".gradle" files that individual projects can import. This is push vs pull, and makes a world of a difference. So we have one shared "java_service.gradle" and one shared "java_library.gradle", and our submodules just do "apply from: <shared-build-file>".
Our root "build.gradle" is intentionally empty with a BIG warning never to add any shared logic in it.
This is just one of the reasons. You also see that with gradle, you can do "gradle test" on one submodule and it will compile all other dependencies but run tests only on this module. Maven, on the other hand, if you do "mvn test --pl <module> --also-make", will compile and test ALL related modules.
I can keep writing a long list of other stuff. But in the end, Maven is a "Project Management Tool" that tried to do a hundred things, and gets nothing right. Gradle is a proper good build tool.
Maven is awful when you get to even moderately large projects -- there are many reasons (and I'm sure you can find them on the web). Yes, you can find heaps of documentation and StackOverflow answers which detail all the workarounds you'll need, but... wouldn't you rather have a system that didn't require huge amounts of documentation and workarounds in the first place?
(Btw, I'm not saying Gradle is the system which transports you to this holy land. I personally think it's hugely better than Maven in every conceivable way, though. Except if "better at being Maven" is a consideration, obviously.)
Highly customizable like ant, but with a ton of predefined behaviors like maven. Unlike maven though, changing or customizing predefined behaviors is a lot easier.
Massive fan of Gradle and Kotlin here. Can't wait to give this a whirl.
Don't get me wrong, the scope of Buck is much more limited than Gradle - where I work we have Gradle tasks for various things that don't quite fit into a build system, like deploying.
But boy, I'd love a plugin that uses Buck behind the scenes for compilation and artifact builds.
Aside: I brig this up because I've found it really hard to have a large Gradle project that is decoupled on the module level, preventing good parallelism.
Specially bad on projects that are consultant driven, where customers hire consultants to work on specific features and then leave.
Please note that Maven written in Java and you can easily create your own plugin and use it from configuration. So you can do everything you want. The same applies for Gradle and probably every other Java build tool.
Also Gradle uses Groovy or Kotlin as a build script language. SBT uses Scala as a build script language. So it's similar to what you want.
I mostly work with CMake and there we have to do a lot of arcane gymnastics to do basic stuff like list manipulation or moving files around, simply because the language has most of these features tacked on after the creator realises that they are necessary.
In Gradle, for example, I have a fairly trivial library that needs to build some native bindings at the right moment and after fighting with the DSL I ended up writing the build script in PowerShell and just call that. I think that the build systems I have encountered so far focus on the 'simple' case too much and render even little more advanced tasks tedious.
I would be happier with a build system that does not declare any magic variables or default steps.
Does anyone know what that means...? It makes it sounds like it is auto uploading information about your build somewhere.