Task (Gradle API 2.11)
Date: 2016-02-08

Package: org.gradle.tooling.model

## [Java] Interface Task

- org.gradle.tooling.model.Launchable

- All Superinterfaces:
    Launchable

  Represents a task which is executable by Gradle.

  Note: `Task` extends `Launchable` since 1.12.

  Since:
    1.0-milestone-3

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `String` | `getDescription()` Returns the description of this task, or `null` if it has no description.
    `String` | `getGroup()` Returns the group a task belongs to.
    `String` | `getName()` Returns the name of this task.
    `String` | `getPath()` Returns the path of this task.
    `Element` | `getProject()` Returns the element which this task belongs to.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Launchable` | `getDescription, getDisplayName, isPublic`

- - ### Method Detail

    - #### @Nullable public String getDescription()

      Returns the description of this task, or `null` if it has no description.

      Returns:
        The description of this task, or `null` if it has no description.
      Since:
        1.0-milestone-3

    - #### @Incubating @Nullable public String getGroup()

      Returns the group a task belongs to.

      Returns:
        the group a task belongs to.
      Since:
        2.5

    - #### public String getName()

      Returns the name of this task. Note that the name is not necessarily a unique identifier for the task.

      Returns:
        The name of this task.
      Since:
        1.0-milestone-3

    - #### public String getPath()

      Returns the path of this task. This is a fully qualified unique name for this task.

      Returns:
        The path of this task.
      Since:
        1.0-milestone-3

    - #### @Deprecated public Element getProject()

      Returns the element which this task belongs to.

      deprecated:
        Do not use this method. It is assumed that the caller already has a reference to owning project.
      throws:
        org.gradle.tooling.model.UnsupportedMethodException From 1.12 for implementations that do not also implement GradleTask.
      Returns:
        The element which this task belongs to.
      Since:
        1.0-milestone-3