@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface OutputFiles
Marks a property as specifying one or more output files for a task.
This annotation should be attached to the getter method or the field for the property.
This will cause the task to be considered out-of-date when the file paths or contents are different to when the task was last run.
The type of the property must be Map
, the String keys uniquely identifying each file value.
The keys of the map should not be null
, and they must be
valid Java identifiers}.
The values will be evaluated to individual files as per Project.file(Object)
.
Example:
class MyReportTask extends DefaultTask { @OutputFiles MapgetReportFiles() { [ xml: new File("report.xml"), html: new File("report.html") ] } }