org.gradle.api.tasks

## Class Delete

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.api.internal.ConventionTask
      - - org.gradle.api.tasks.Delete

- All Implemented Interfaces:
    Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, ExtensionAware, Task, org.gradle.util.Configurable<Task>

      public class Delete
      extends org.gradle.api.internal.ConventionTask

  Deletes files or directories. Example:

       task makePretty(type: Delete) {
         delete 'uglyFolder', 'uglyFile'
       }

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Delete()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `clean()`
    `Delete` | `delete(Object... targets)` Adds some files to be deleted by this task.
    `Set<Object>` | `getDelete()` Returns the set of files which will be deleted by this task.
    `FileCollection` | `getTargetFiles()` Returns the resolved set of files which will be deleted by this task.
    `void` | `setDelete(Object target)` Sets the files to be deleted by this task.

    - ### Methods inherited from class org.gradle.api.internal.ConventionTask

      `conventionMapping, conventionMapping, getConventionMapping`

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `addValidator, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, executeWithoutThrowingTaskFailure, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Delete

          public Delete()

  - ### Method Detail

    - #### clean

          protected void clean()

    - #### getTargetFiles

          public FileCollection getTargetFiles()

      Returns the resolved set of files which will be deleted by this task.
      Returns:
        The files. Never returns null.

    - #### getDelete

          public Set<Object> getDelete()

      Returns the set of files which will be deleted by this task.
      Returns:
        The files. Never returns null.

    - #### setDelete

          public void setDelete(Object target)

      Sets the files to be deleted by this task.
      Parameters:
        `target` - Any type of object accepted by `Project.files(Object...)`

    - #### delete

          public Delete delete(Object... targets)

      Adds some files to be deleted by this task. The given targets are evaluated as for `Project.files(Object...)`.
      Parameters:
        `targets` - Any type of object accepted by `Project.files(Object...)`