Package org.gradle.tooling.model

## Interface Task

- All Superinterfaces:
    `Launchable`, `ProjectModel`
  All Known Subinterfaces:
    `GradleTask`

      public interface Task
      extends Launchable

  Represents a task which is executable by Gradle.

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

  Since:
    1.0-milestone-3

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `java.lang.String` | `getBuildTreePath()` | Returns the path of this task within the build tree.
    `java.lang.String` | `getDescription()` | Returns the description of this task, or `null` if it has no description.
    `java.lang.String` | `getGroup()` | Returns the group a task belongs to.
    `java.lang.String` | `getName()` | Returns the name of this task.
    `java.lang.String` | `getPath()` | Returns the path of this task.

    - ### Methods inherited from interface org.gradle.tooling.model.Launchable

      `getDisplayName, getProjectIdentifier, isPublic`

- - ### Method Detail

    - #### getPath

          java.lang.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

    - #### getBuildTreePath

          @Incubating
          java.lang.String getBuildTreePath()

      Returns the path of this task within the build tree. This is a unique name for this task within the composite build.
      Returns:
        The path of this task in the composite build.
      Throws:
        `UnsupportedMethodException` - When the target Gradle version does not support this method.
      Since:
        8.2

    - #### getName

          java.lang.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

    - #### getDescription

          @Nullable
          java.lang.String getDescription()

      Returns the description of this task, or `null` if it has no description.
      Specified by:
        `getDescription` in interface `Launchable`
      Returns:
        The description of this task, or `null` if it has no description.
      Since:
        1.0-milestone-3

    - #### getGroup

          @Nullable
          java.lang.String getGroup()

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