Gradle + Play: Configuring CSS sources

The guide for the Play Plugin has an example for configuring JavaScript sources. I don’t see a CSS equivalent in any guide or Javadoc.

My end goal is to hook into the Play assets pipeline to compile my LESS files and add them generated CSS to the play binary.

I’d really love some advice on this.

FYI, I ended up solving this like so:

model {
 components {
   play {
     // Add LESS to asset pipeline
    tasks.create("${binary.name}Less", CompileLessTask) { lessTask ->
      source "app/assets/stylesheets"
      exclude "**/_*.less"
      dest = "${buildDir}/tmp/${lessTask.name}"

      binary.assets.builtBy(lessTask)
    }
   }
  }
}