I have a gradle build script into which I am trying to include Eric Wendelin\'s css plugin - http://eriwen.github.io/gradle-css-plugin/
Its easy enough to implement,
I would suggest the method presented on the Gradle forum:
def createMinifyCssTask(def brand, def sourceFile, def destFile) {
return tasks.create("minify${brand}Css", com.eriwen.gradle.css.tasks.MinifyCssTask) {
source = sourceFile
dest = destFile
}
}
I have used this method myself to create custom tasks, and it works very well.