Tapestry Training -- From The Source

Let me help you get your team up to speed in Tapestry ... fast. Visit howardlewisship.com for details on training, mentoring and support!

Thursday, October 28, 2010

Gradle is Great

My initial experience with Gradle is very positive. I've been quickly able to convert over my Maven POMs to Gradle build files, which are wonderfully concise. You can see the last of the results in this commit (work backwards to the parent commits to see some of the Gradle build scripts).

So far, Gradle is living up to its motto: A better way to build.

Next up is dealing with Maven artifact deployments, and the generation of project reports.

I will absolutely be using Gradle for all upcoming projects, and will hopefully revise Tapestry itself to use Gradle at some point soon.

7 comments:

Massimo said...

Well I admit to speak as someone who have never used gradle but it still use the default maven repo for dependency?

Unknown said...

What about Eclipse support? Is there any plugin available?

Unknown said...

I'm not aware of an Eclipse plugin, but I was using the "mvn eclipse:eclipse" goal for my various projects, and Gradle has the equivalent "gradle eclipse" task.

It has no problem pulling dependencies from a Maven repo, and has a Maven plugin to install to your local Maven repo. I haven't gotten as far as pushing to a remote repo, but that's in there.

It's sensible and succinct, and easily extensible because a Gradle build script is stil a Groovy DSL.

Unknown said...

I couldn't find an automated way of publishing artifacts to nexus central (because of the whole signing thing). With the release of maven 3 this may change, but as of today I don't know of any working solution.

Please post your findings, in any case.

MichaƂ Gruca said...

I found Gradle some time ago, when I was searching for some way to avoid using mvn. At the time project was around 0.7/0.8 ver and only thing that stopped me from finishing Tapestry 'archetype' was lsit of changes for next versions. They were changing main interface and that didn't encourage me to invest time till project is more stable. Now, with hiberante abandoning mvn and moving to Gradle, I think that I'll look into project once again, as it is my most wanted tool.

As for eclipse support. Back when I was interested more in gradle, they were writing that grovvy plugin will have some support for Gradle. I doubt if it will be so helpful as m2, but better something than nothing. As gradle can work with pom.xml i was thinking about creating pom, just for managing dependencies.

Massimo said...

Did I read right you aren't using any maven plugin from within Eclipse, for example m2eclipse from sonatype?

Unknown said...

@Massimo absolutely; every attempt I've ever made to use a Maven Eclipse Plugin has caused stability and performance problems in Eclipse. Using mvn eclipse:eclipse has been my standard for T5 development and elsewhere ... so it's simple to swap that for gradle eclipse.