Package: org.gradle.api

## [Java] Interface BuildableComponentSpec

- org.gradle.api.BuildableComponentSpec

- All Superinterfaces:
    ModelElement, ComponentSpec, Named, Buildable

  A ComponentSpec that is directly Buildable via a specified task.

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `void` | `builtBy(Object... tasks)` Adds tasks required to build this component.
    `Task` | `getBuildTask()` Returns the task responsible for building this component.
    `boolean` | `hasBuildDependencies()`
    `void` | `setBuildTask(Task buildTask)` Specifies the task responsible for building this component.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface Buildable` | `getBuildDependencies`
    `interface ComponentSpec` | `getProjectPath`
    `interface ModelElement` | `getDisplayName, getName`
    `interface Named` | `getName`

- - ### Method Detail

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

      Adds tasks required to build this component. Tasks added this way are subsequently added as dependencies of this component's build task.

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

      Returns the task responsible for building this component.

    - #### public boolean hasBuildDependencies()

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

      Specifies the task responsible for building this component.