Steve Appling wrote:
For tasks just based off of DefaultTask (task mytask << {} ), can I
set up the
InputFiles or InputDirectory in some way so that the up to date checks
work?
I didn't want to have to create my own task class and use the
annotations. It seemed like there might be a lighter weight way of
doing this.
There is. You can register the input and output files programatically,
using task.inputs and task.outputs:
task myTask {
// register some input files
inputs.files 'some-file', someFileCollection
// register an input dir
inputs.dir 'some-dir'
// register some output files
output.files 'some-outout-file', 'some-output-dir'
doFirst {
// can use the input and output files in the action, if required
inputs.files.each { ... }
outputs.files.each { .... }
}
}
I'm not 100% happy with this API. Any suggestions for improvements welcome.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email