# Class GradleBuild

java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.GradleBuild

All Implemented Interfaces:
  `Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Named, ExtensionAware, Task, Configurable<Task>`

@DisableCachingByDefault(because="Child Gradle build will do its own caching") public abstract class GradleBuild extends org.gradle.api.internal.ConventionTask
Executes a Gradle build.

Since:
  0.9

- ## Nested Class Summary

  ### Nested classes/interfaces inherited from interface Named

  `Named.Namer`

- ## Field Summary

  ### Fields inherited from interface Task

  `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `GradleBuild()`
  Creates a new `GradleBuild`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `(package private) void`
  `build()`
  `String`
  `getBuildName()`
  The build name to use for the nested build.
  `File`
  `getDir()`
  Returns the project directory for the build.
  `StartParameter`
  `getStartParameter()`
  Returns the full set of parameters that will be used to execute the build.
  `List<String>`
  `getTasks()`
  Returns the tasks that should be executed for this build.
  `void`
  `setBuildName(String buildName)`
  Sets build name to use for the nested build.
  `void`
  `setDir(File dir)`
  Sets the project directory for the build.
  `void`
  `setDir(Object dir)`
  Sets the project directory for the build.
  `void`
  `setStartParameter(StartParameter startParameter)`
  Sets the full set of parameters that will be used to execute the build.
  `void`
  `setTasks(Collection<String> tasks)`
  Sets the tasks that should be executed for this build.
  `void`
  `setTasks(List<String> tasks)`
  Sets the tasks that should be executed for this build.

  ### Methods inherited from class org.gradle.api.internal.ConventionTask

  `conventionMapping, conventionMapping, getConventionMapping`

  ### Methods inherited from class DefaultTask

  `compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

  ### Methods inherited from class org.gradle.api.internal.AbstractTask

  `acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getLoggingManager, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, service, setImpliesSubProjects`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface Task

  `doNotTrackState, notCompatibleWithConfigurationCache, service`

- ## Constructor Details

  - ### GradleBuild

    public GradleBuild()
    Creates a new `GradleBuild`.
    Since:
      0.9

- ## Method Details

  - ### getStartParameter

    @Internal public StartParameter getStartParameter()
    Returns the full set of parameters that will be used to execute the build.
    Returns:
      the parameters. Never returns null.
    Since:
      0.9

  - ### setStartParameter

    public void setStartParameter(StartParameter startParameter)
    Sets the full set of parameters that will be used to execute the build.
    Parameters:
      `startParameter` - the parameters. Should not be null.
    Since:
      0.9

  - ### getDir

    @Internal public File getDir()
    Returns the project directory for the build. Defaults to the project directory.
    Returns:
      The project directory. Never returns null.
    Since:
      0.9

  - ### setDir

    public void setDir(File dir)
    Sets the project directory for the build.
    Parameters:
      `dir` - The project directory. Should not be null.
    Since:
      4.0

  - ### setDir

    public void setDir(Object dir)
    Sets the project directory for the build.
    Parameters:
      `dir` - The project directory. Should not be null.
    Since:
      0.9

  - ### getTasks

    @Input public List<String> getTasks()
    Returns the tasks that should be executed for this build.
    Returns:
      The sequence. May be empty. Never returns null.
    Since:
      0.9

  - ### setTasks

    public void setTasks(List<String> tasks)
    Sets the tasks that should be executed for this build.
    Parameters:
      `tasks` - The task names. May be empty or null to use the default tasks for the build.
    Since:
      4.0

  - ### setTasks

    public void setTasks(Collection<String> tasks)
    Sets the tasks that should be executed for this build.
    Parameters:
      `tasks` - The task names. May be empty or null to use the default tasks for the build.
    Since:
      0.9

  - ### getBuildName

    @Internal public String getBuildName()
    The build name to use for the nested build.

    If no value is specified, the name of the directory of the build will be used.

    Returns:
      the build name to use for the nested build (or null if the default is to be used)
    Since:
      6.0

  - ### setBuildName

    public void setBuildName(String buildName)
    Sets build name to use for the nested build.
    Parameters:
      `buildName` - the build name to use for the nested build
    Since:
      6.0

  - ### build

    void build()