Package: org.gradle.api

## [Java] Interface BuildableModelElement

- org.gradle.api.Buildable

- All Superinterfaces:
    Buildable

  A model element that is directly buildable. Such an element mirrors a specified lifecycle task in the task graph, and can accept dependencies which are then associated with the lifecycle task.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `builtBy(Object... tasks)` Adds a task that is required for the construction of this element.
    `Task` | `getBuildTask()` Returns the 'lifecycle' task associated with the construction of this element.
    `boolean` | `hasBuildDependencies()`
    `void` | `setBuildTask(Task lifecycleTask)` Associates a 'lifecycle' task with the construction of this element.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Buildable` | `getBuildDependencies`

- - ### Method Detail

    - #### public void builtBy(Object... tasks)

      Adds a task that is required for the construction of this element. A task added this way is then added as a dependency of the associated lifecycle task.

    - #### @Nullable public Task getBuildTask()

      Returns the 'lifecycle' task associated with the construction of this element.

    - #### public boolean hasBuildDependencies()

    - #### public void setBuildTask(Task lifecycleTask)

      Associates a 'lifecycle' task with the construction of this element.