Annotation Type Internal


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

Attached to a task property to indicate that the property is not to be taken into account for input fingerprinting, meaning changing its value won't affect up-to-date checking and build caching.

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:Internal. 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 not to be considered out-of-date when the property has changed.

Properties annotated with @Internal are not subject to presence validation and are treated as inherently optional. There is no need, and it is an error, to also annotate them with Optional.

Since:
3.0
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The reason for ignoring this element.
  • Element Details

    • value

      String value
      The reason for ignoring this element.
      Since:
      3.0
      Default:
      ""