@Documented @Retention(value=RUNTIME) @Target(value={METHOD,FIELD}) public @interface OutputDirectories
Marks a property as specifying one or more output directories 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 directory paths or task output to those directories have been modified since 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 MapgetReportDirectories() { def reportsDir = new File("reports") [ xml: new File(reportsDir, "xml"), html: new File(reportsDir, "html") ] } }