Annotation Type Input


@Documented @Retention(RUNTIME) @Target({METHOD,FIELD}) public @interface Input

Attached to a task property to indicate that the property specifies some input value for the task.

This annotation should be attached to the getter method in Java or the property in Groovy. In Kotlin, use the get: use-site target to attach it to the property getter, for example @get:Input. This also works on abstract properties, where the annotation without a use-site target does not compile. Annotations on setters or just the field in Java are ignored.

This will cause the task to be considered out-of-date when the property has changed. This annotation cannot be used on a File object. If you want to refer to the file path, independently of its contents, return a String instead which returns the absolute path. If, instead, you want to refer to the contents and path of a file or a directory, use InputFile or InputDirectory respectively.

Since:
0.9