Annotation Interface OutputFiles


@Documented @Retention(RUNTIME) @Target({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 in Java or the property in Groovy. Annotations on setters or just the field in Java are ignored.

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.

When the annotated property is a Map, then each output file will be associated with an identity. For cacheable tasks this is a requirement. The keys of the map must be valid Java identifiers. The values of the map will be evaluated to individual files as per Project.file(Object).

Otherwise the given files will be evaluated as per Project.files(Object...), and task output caching will be disabled for the task.