Hi team,
As is probably evident based on our Ivy integration almost a year go,
I'm curious whenever I see potential ways to simplify a build
environment. Incorporating Ivy was a clean way of managing
dependencies. But Ivy doesn't do some other neat things that Maven
can do, but we also didn't want to 'fight' with Maven's quirks. So,
there is room for improvement.
Well, I gave Gradle my first shot this week and incorporated it into a
large project at work, with multiple modules ('sub-projects' in Gradle
speak), and it was a great experience. I saw someone post on a blog
that:
Gradle = Maven - pain.
I couldn't agree more! Convention-based build but with all the power
and flexibility of Groovy and Ant. I've really enjoyed learning about
it and using it.
It uses Ant and Ivy under the hood, and I think Maven2 as well.
Because a build.gradle file is essentially domain-specific groovy, you
can do anything in gradle that you can do with Groovy. And Ant + Ivy.
And Maven. It is the best of all worlds that I've come across thus
far. I must say that writing conditional logic in Groovy is far
simpler and more enjoyable. Consider trying to do this in Ant xml
(meaning, if the release task is called, then append the SNAPSHOT
designation):
if (!build.taskGraph.hasTask(":release")) {
version += "-SNAPSHOT"
}
Much nicer than ant properties to trigger conditionals - yuck.
Gradle can also very easily publish builds to the maven repo
(autogeneration of .poms, etc) or other locations - which we don't
have the capability to do in our current environment and is a bit of a
pain trying to manage when we do a release.
What do you guys think of using Gradle to build JSecurity?
- Les