M6 and M8 did not work for me with:
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
Trying gradle-1.0-milestone-9-20120227005038+0100 (last nights) did not work either. i.e. rebuilds every time
I am using a slightly more generic version:
Not all code included but this is the gist of it

Warren Muller
added a comment - 27/Feb/12 2:55 AM M6 and M8 did not work for me with:
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
Trying gradle-1.0-milestone-9-20120227005038+0100 (last nights) did not work either. i.e. rebuilds every time
I am using a slightly more generic version:
Not all code included but this is the gist of it
// mc, cp, ag defined above as being set by iteration through a map of settings
tasks.add(name: "wsdl2Java${k.capitalize()}" ,type: JavaExec) {
description= "Generates Java source for wsdl:${k}=${v.file}"
outputs.upToDateSpec = new org.gradle.api.specs.AndSpec()
outputs.files generatedWsdlDir
inputs.files configurations.compile, wsdlFile
main = mc
classpath = cp
args = ag
logger.debug "main=${main},classpath=${classpath},args=${args}"
}
clean.dependsOn "cleanWsdl2Java${k.capitalize()}"
project. "compile${wsdlSrcSetName.capitalize()}Java" .dependsOn "wsdl2Java${k.capitalize()}"