Is there any documentation concerning annotations like @OutputFile or @InputFiles?

I can’t find any documentation concerning annotations in gradle docs. Where can I find it?

thanks

Frank

Hello Rene, many thanks for your quick reply. Indeed, chapter 14.8 would be a good place.

Regards Frank

At the moment I think, the javadoc is the only place where those annotations are documented. There should a description added to chapter 14.8. of the userguide.

In general, these Annotations are used by gradle to check whether a task is up-to-date or not.

The gradle up-to-date check in a nutshell (anybody is invited to correct me):

  1. If the referenced files (@InputFile) and properties (@Input) of a task AND the output (@OutputFile) hasn’t changed since the last task execution, the task is considered to be up-to-date.
  2. If the input files or an input property has changed the task is not up-to-date and executed again.
  3. if the output of a task is deleted or has changed since the last build, the task is marked as not up-to-date and executed again.
  4. if no output is declared, the task is always executed.

For details about the different annotations have a look at the corresponding javadoc at http://gradle.org/current/docs/javadoc/org/gradle/api/tasks/package-summary.html