Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks
[Java] Class GradleBuild

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

    public class GradleBuild
    extends ConventionTask

Executes a Gradle build.

Constructor Summary
`GradleBuild(StartParameter currentBuild, GradleLauncherFactory gradleLauncherFactory)`

Method Summary
`File` | `getBuildFile()` Returns the build file that should be used for this 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` | `getTasks()` Returns the tasks that should be executed for this build.
`void` | `setBuildFile(Object file)` Sets the build file that should be used for this 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 tasks)` Sets the tasks that should be executed for this build.

Constructor Detail

### GradleBuild

    @Inject
    public GradleBuild(StartParameter currentBuild, GradleLauncherFactory gradleLauncherFactory)

Method Detail

### getBuildFile

    public File getBuildFile()

  Returns the build file that should be used for this build. Defaults to {
  value:
    org.gradle.api.Project#DEFAULT_BUILD_FILE} in the project directory.
  Returns:
    The build file. May be null.

### getDir

    public File getDir()

  Returns the project directory for the build. Defaults to the project directory.
  Returns:
    The project directory. Never returns null.

### getStartParameter

    public StartParameter getStartParameter()

  Returns the full set of parameters that will be used to execute the build.
  Returns:
    the parameters. Never returns null.

### getTasks

    public List getTasks()

  Returns the tasks that should be executed for this build.
  Returns:
    The sequence. May be empty. Never returns null.

### setBuildFile

    public void setBuildFile(Object file)

  Sets the build file that should be used for this build.
  Parameters:
    `file` - The build file. May be null to use the default build file for the build.

### setDir

    public void setDir(Object dir)

  Sets the project directory for the build.
  Parameters:
    `dir` - The project directory. Should not be null.

### 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.

### setTasks

    public void setTasks(Collection 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.

Gradle API 1.10