GradleBuild (Gradle API 8.12.1)
Description: declaration: package: org.gradle.tooling.model.gradle, interface: GradleBuild

Package org.gradle.tooling.model.gradle

# Interface GradleBuild

All Superinterfaces:
  `BuildModel`, `Model`

public interface GradleBuild extends Model, BuildModel
Provides information about the structure of a Gradle build.

Since:
  1.8

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BuildIdentifier`
  `getBuildIdentifier()`
  Returns the identifier for this Gradle build.
  `DomainObjectSet<? extends GradleBuild>`
  `getEditableBuilds()`
  Returns all builds contained in this build that should be imported into an IDE.
  `DomainObjectSet<? extends GradleBuild>`
  `getIncludedBuilds()`
  Returns the included builds that were referenced by this build.
  `DomainObjectSet<? extends BasicGradleProject>`
  `getProjects()`
  Returns the set of all projects for this build.
  `BasicGradleProject`
  `getRootProject()`
  Returns the root project for this build.

- ## Method Details

  - ### getBuildIdentifier

    BuildIdentifier getBuildIdentifier()
    Returns the identifier for this Gradle build.
    Specified by:
      `getBuildIdentifier` in interface `BuildModel`
    Since:
      2.13

  - ### getRootProject

    BasicGradleProject getRootProject()
    Returns the root project for this build.
    Returns:
      The root project

  - ### getProjects

    DomainObjectSet<? extends BasicGradleProject> getProjects()
    Returns the set of all projects for this build.
    Returns:
      The set of all projects.

  - ### getIncludedBuilds

    DomainObjectSet<? extends GradleBuild> getIncludedBuilds()
    Returns the included builds that were referenced by this build. This is the set of builds that were directly included by this build via its `Settings` instance.

    Note that this set does not include builds that are added in other ways, such as a `buildSrc` build. Also note that a build may be included by multiple builds, so that the inclusions form a graph of builds rather than a tree of builds. There may be cycles in this graph.

    In general, it is better to use `getEditableBuilds()` instead of this method.

    Since:
      3.3

  - ### getEditableBuilds

    DomainObjectSet<? extends GradleBuild> getEditableBuilds()
    Returns all builds contained in this build that should be imported into an IDE.

    This is not always the same the builds returned by `getIncludedBuilds()`. For the root build, the set of importable builds contains all builds that participate in the composite build, including those directly included by the root build plus all builds included transitively. For Gradle 7.2 and later, this set also includes any `buildSrc` builds that may be present. For all other builds, this set is empty.

    Note that this set does not include the root build itself.

    Since:
      4.10