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:

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

    ReplyDelete
  2. What about Eclipse support? Is there any plugin available?

    ReplyDelete
  3. 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.

    ReplyDelete
  4. 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.

    ReplyDelete
  5. 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.

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

    ReplyDelete
  7. @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.

    ReplyDelete

Please note that this is not a support forum for Tapestry. Requests for help will be deleted. Please subscribe to the Tapestry user mailing list if you are in need of support, or contact me directly for professional (for pay) support.

Spammers: Don't bother. I delete your comments and it's a waste of time for both of us. 垃圾邮件发送者:不要打扰。我删除您的评论和它的时间对我们双方的浪费