# Destroys

@Documented
@Retention(value = RetentionPolicy.RUNTIME)
@Target(value = [ElementType.METHOD, ElementType.FIELD])
annotation class Destroys(source)

Marks a property as specifying a file or directory that a task destroys. The file or directory belongs to another task.

This annotation should be attached to the getter method or the field for the property.

This will cause the task to have exclusive access to this file or directory while running. This means that other tasks that either create or consume this file (by specifying the file or directory as an input or output) cannot execute concurrently with a task that destroys this file. This is useful for tasks that clean up after other tasks such as `clean`.

#### Since

4.0

## Functions

annotationType
Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
equals
Link copied to clipboard
abstract fun equals(p: Any): Boolean
hashCode
Link copied to clipboard
abstract fun hashCode(): Int
toString
Link copied to clipboard
abstract fun toString(): String