org.gradle.api

## Interface BuildableModelElement

- All Superinterfaces:
    Buildable
  All Known Subinterfaces:
    ApplicationBinarySpec, AssemblerSourceSet, BinarySpec, ClassDirectoryBinarySpec, CoffeeScriptSourceSet, CppSourceSet, CSourceSet, CUnitTestSuiteBinarySpec, DependentSourceSet, GoogleTestTestSuiteBinarySpec, HeaderExportingSourceSet, JarBinarySpec, JavaScriptSourceSet, JavaSourceSet, JvmBinarySpec, JvmClasses, JvmResourceSet, LanguageSourceSet, LibraryBinarySpec, NativeBinarySpec, NativeExecutableBinarySpec, NativeLibraryBinarySpec, NativeResourceSet, NativeTestSuiteBinarySpec, ObjectiveCppSourceSet, ObjectiveCSourceSet, PlayApplicationBinarySpec, PublicAssets, RoutesSourceSet, ScalaLanguageSourceSet, SharedLibraryBinarySpec, StaticLibraryBinarySpec, TestSuiteBinarySpec, TwirlSourceSet, VisualStudioProject, VisualStudioSolution, WindowsResourceSet
  All Known Implementing Classes:
    org.gradle.api.internal.AbstractBuildableModelElement, BaseBinarySpec, BaseLanguageSourceSet

      @Incubating
      public interface BuildableModelElement
      extends 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.

- - ### Method Summary

    Methods
    Modifier and Type | Method 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.

    - ### Methods inherited from interface org.gradle.api.Buildable

      `getBuildDependencies`

- - ### Method Detail

    - #### getBuildTask

          @Nullable
          Task getBuildTask()

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

    - #### setBuildTask

          void setBuildTask(Task lifecycleTask)

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

    - #### builtBy

          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.

    - #### hasBuildDependencies

          boolean hasBuildDependencies()