# Annotation Type UntrackedTask

@Documented @Retention(RUNTIME) @Target(TYPE) public @interface UntrackedTask
Attached to a task to declare that the task should be untracked.

If a task is untracked, then Gradle will not try to capture its state. That also means that Gradle does not do any optimizations for running the task. For example, such a task will always be out of date and never stored in or loaded from the build cache.

There can be different reasons for declaring a task as untracked, for example:

- Some input or output locations contain unreadable files like pipes where Gradle cannot track the content.
- The input or output is stored remotely, for example in a database, and its state cannot be tracked.
- Another tool like Git already takes care of keeping the state, so it doesn't make sense for Gradle to do additional bookkeeping.
- Prevent Gradle from trying to snapshot a potentially large amount of content if an output location is not exclusively owned by the build.

`InputChanges` cannot be used for untracked tasks, since incremental tasks need to track the state of their inputs and outputs for them to be correct.

Since:
  7.3

- ## Required Element Summary

  Required Elements
  Modifier and Type
  Required Element
  Description
  `String`
  `because`
  Mandatory reason why the task is untracked.

- ## Element Details

  - ### because

    String because
    Mandatory reason why the task is untracked.
    Since:
      7.3