Showing posts with label gradle. Show all posts
Showing posts with label gradle. Show all posts

Tuesday, March 13, 2012

Cobertura Goodness for Groovy code in Gradle builds

Was trying to measure code coverage on a Groovy side project and tried a number of Gradle plugins for Cobertura. Settled for this one from Val Kolovos (thanks dude :)), as it just worked out of the box.

By default it doesn't drill into Groovy files to show the line coverage on source files. To get it to do so you need to add the following convention setting in your build.gradle:

cobertura {

coverageSourceDirs = sourceSets.main.java.srcDirs + sourceSets.main.groovy.srcDirs

}

Enjoy.

Sunday, February 26, 2012

Gradle Grails Plugin for Grails 2.0.x

I love the Grails Framework but sometimes I prefer to build my Grails projects using Gradle. I am just happier that way.

I have just started upgrading one of our projects to Grails 2.0.x and thought I would share what our build.gradle looks like.

Full build script can be found on Github. Enjoy!