Aykut's Reviews > Building and Testing with Gradle

Building and Testing with Gradle by Tim Berglund
Rate this book
Clear rating

's review
Jan 02, 12

bookshelves: technical
Read in January, 2012

The other day, i was reading an article on Gradle. After reading it, I thought I should give it a try.
So I found this book.

Somewhere in this book, it says :
Gradle offers the flexibility of Ant, which many teams still cherish, but with the dependency management style of Ivy, the intelligent defaults of Maven, the speed and hashing of Git, and the meta-programming power of Groovy.

It's obviously attractive.
I had a very little usage of Ant, a few years ago. I use Maven intensively. I never used Ivy.
In fact, my real interest here was to know if I could (and should) replace Maven by Gradle in my projects.
So, to effectively replace Maven, i need Gradle to be able to generate projects (maven archetypes), eclisify my projects, support multi projects, and being, of course, more flexible than Maven.

I didn't see actually something about initializing a project in this book. Maybe i missed it. I must say that i've read the book late in the night ;)
But very easily, i created a task which creates all the source structure i want, in a few lines.
Of course, it's not yet exactly a maven archetype like. There is actually a JIRA ticket about that (http://issues.gradle.org/browse/GRADL...).
I can create a complex structure very easily.
Gradle can also eclipsify your project very easily. You just have to apply the eclipse plugin, and type gradle eclipse in your favorite terminal.
Gradle obviously supports multi projects, and it's very flexible. I love the way you can put all your build configuration in one top build.gradle, or separate your build in several build.gradle, for each subproject.
You can also go in a hybrid way, using both methods.

So, i can say that Gradle do what i do with Maven in every day use. But is there a real interest for me to use it?
I would say yes. I feel to have a real power in my hands, with Gradle tasks.
After a glance to the documentation, the list of available plugins and examples, it seems that i'll really enjoy using Gradle.

I tried to transform an old school project, which doesn't use Ant or Maven, into a Gradle project.
I also tried to transform a Maven project, into a Gradle project.
It was a success both times. And I am amazed how fast it went.

If you look at Gradle's Jira, you'll see there is 630 majors issues, 31 critical and 7 blocker.
630 major is huge, but calm down. A lot of them are wishes, improvements or new features.
There is in fact today 268 bugs.

Conclusion : I really have a good feeling about Gradle. This book is a nice introduction to Gradle, but i suggest to have a look at the online documentation, where you can find useful snippets and examples. Now i'll have to convince my colleagues ;-)

Sign into Goodreads to see if any of your friends have read Building and Testing with Gradle.
sign in »

No comments have been added yet.