Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.invocation
Class DefaultBuild

    java.lang.Object
      org.gradle.invocation.DefaultBuild

All Implemented Interfaces:
  org.gradle.api.internal.BuildInternal, Build

    public class DefaultBuild

extends java.lang.Object
implements org.gradle.api.internal.BuildInternal

Constructor Summary
`DefaultBuild(StartParameter startParameter, java.lang.ClassLoader buildScriptClassLoader, InternalRepository internalRepository)`

Method Summary
`ProjectEvaluationListener` | `addProjectEvaluationListener(ProjectEvaluationListener listener)` Adds a listener to this build, to receive notifications as projects are evaluated.
`void` | `afterProject(groovy.lang.Closure closure)` Adds a closure to be called immediately after a project is evaluated.
`void` | `beforeProject(groovy.lang.Closure closure)` Adds a closure to be called immediately before a project is evaluated.
`java.lang.ClassLoader` | `getBuildScriptClassLoader()`
`org.gradle.api.internal.project.ProjectInternal` | `getDefaultProject()`
`java.io.File` | `getGradleHomeDir()` Returns the Gradle home directory.
`java.io.File` | `getGradleUserHomeDir()` Returns the Gradle user home directory.
`java.lang.String` | `getGradleVersion()` Returns the current Gradle version.
`InternalRepository` | `getInternalRepository()` Returns the repository used to pass artifacts between projects in this build.
`org.gradle.api.internal.plugins.DefaultPluginRegistry` | `getPluginRegistry()`
`ProjectEvaluationListener` | `getProjectEvaluationBroadcaster()`
`org.gradle.api.internal.project.IProjectRegistry<org.gradle.api.internal.project.ProjectInternal>` | `getProjectRegistry()`
`org.gradle.api.internal.project.ProjectInternal` | `getRootProject()` Returns the root project of this build.
`StartParameter` | `getStartParameter()` Returns the `StartParameter` used to start this build.
`TaskExecuter` | `getTaskGraph()` Returns the `TaskExecutionGraph` for this build.
`void` | `removeProjectEvaluationListener(ProjectEvaluationListener listener)` Removes the given listener from this build.
`void` | `setDefaultProject(org.gradle.api.internal.project.ProjectInternal defaultProject)`
`void` | `setInternalRepository(InternalRepository internalRepository)`
`void` | `setRootProject(org.gradle.api.internal.project.ProjectInternal rootProject)`
`void` | `setTaskGraph(TaskExecuter taskGraph)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultBuild

    public DefaultBuild(StartParameter startParameter,
                        java.lang.ClassLoader buildScriptClassLoader,
                        InternalRepository internalRepository)

Method Detail

### getGradleVersion

    public java.lang.String getGradleVersion()

  Description copied from interface: `Build`

  Returns the current Gradle version.

  Specified by:
    `getGradleVersion` in interface `Build`
  Returns:
    The Gradle version. Never returns null.

### getGradleHomeDir

    public java.io.File getGradleHomeDir()

  Description copied from interface: `Build`

  Returns the Gradle home directory. This directory is used to locate resources such as the default imports file.

  Specified by:
    `getGradleHomeDir` in interface `Build`
  Returns:
    The home directory. Never returns null.

### getGradleUserHomeDir

    public java.io.File getGradleUserHomeDir()

  Description copied from interface: `Build`

  Returns the Gradle user home directory. This directory is used to cache downloaded resources.

  Specified by:
    `getGradleUserHomeDir` in interface `Build`
  Returns:
    The user home directory. Never returns null.

### getStartParameter

    public StartParameter getStartParameter()

  Description copied from interface: `Build`
  Returns the `StartParameter` used to start this build.

  Specified by:
    `getStartParameter` in interface `Build`
  Returns:
    The start parameter. Never returns null.

### getRootProject

    public org.gradle.api.internal.project.ProjectInternal getRootProject()

  Description copied from interface: `Build`

  Returns the root project of this build.

  Specified by:
    `getRootProject` in interface `org.gradle.api.internal.BuildInternal`
  Specified by:
    `getRootProject` in interface `Build`
  Returns:
    The root project. Never returns null.

### setRootProject

    public void setRootProject(org.gradle.api.internal.project.ProjectInternal rootProject)

### getDefaultProject

    public org.gradle.api.internal.project.ProjectInternal getDefaultProject()

  Specified by:
    `getDefaultProject` in interface `org.gradle.api.internal.BuildInternal`

### setDefaultProject

    public void setDefaultProject(org.gradle.api.internal.project.ProjectInternal defaultProject)

### getTaskGraph

    public TaskExecuter getTaskGraph()

  Description copied from interface: `Build`

  Returns the `TaskExecutionGraph` for this build.

  Specified by:
    `getTaskGraph` in interface `org.gradle.api.internal.BuildInternal`
  Specified by:
    `getTaskGraph` in interface `Build`
  Returns:
    The task graph. Never returns null.

### setTaskGraph

    public void setTaskGraph(TaskExecuter taskGraph)

### getProjectRegistry

    public org.gradle.api.internal.project.IProjectRegistry<org.gradle.api.internal.project.ProjectInternal> getProjectRegistry()

  Specified by:
    `getProjectRegistry` in interface `org.gradle.api.internal.BuildInternal`

### getBuildScriptClassLoader

    public java.lang.ClassLoader getBuildScriptClassLoader()

  Specified by:
    `getBuildScriptClassLoader` in interface `org.gradle.api.internal.BuildInternal`

### getInternalRepository

    public InternalRepository getInternalRepository()

  Description copied from interface: `Build`
  Returns the repository used to pass artifacts between projects in this build.

  Specified by:
    `getInternalRepository` in interface `Build`
  Returns:
    The internal repository. Never returns null.

### setInternalRepository

    public void setInternalRepository(InternalRepository internalRepository)

### getPluginRegistry

    public org.gradle.api.internal.plugins.DefaultPluginRegistry getPluginRegistry()

  Specified by:
    `getPluginRegistry` in interface `org.gradle.api.internal.BuildInternal`

### addProjectEvaluationListener

    public ProjectEvaluationListener addProjectEvaluationListener(ProjectEvaluationListener listener)

  Description copied from interface: `Build`
  Adds a listener to this build, to receive notifications as projects are evaluated.

  Specified by:
    `addProjectEvaluationListener` in interface `Build`
  Parameters:
    `listener` - The listener to add. Does nothing if this listener has already been added.
  Returns:
    The added listener.

### removeProjectEvaluationListener

    public void removeProjectEvaluationListener(ProjectEvaluationListener listener)

  Description copied from interface: `Build`
  Removes the given listener from this build.

  Specified by:
    `removeProjectEvaluationListener` in interface `Build`
  Parameters:
    `listener` - The listener to remove. Does nothing if this listener has not been added.

### beforeProject

    public void beforeProject(groovy.lang.Closure closure)

  Description copied from interface: `Build`
  Adds a closure to be called immediately before a project is evaluated. The project is passed to the closure as a parameter.

  Specified by:
    `beforeProject` in interface `Build`
  Parameters:
    `closure` - The closure to execute.

### afterProject

    public void afterProject(groovy.lang.Closure closure)

  Description copied from interface: `Build`
  Adds a closure to be called immediately after a project is evaluated. The project is passed to the closure as the first parameter. The project evaluation failure, if any, is passed as the second parameter. Both parameters are options.

  Specified by:
    `afterProject` in interface `Build`
  Parameters:
    `closure` - The closure to execute.

### getProjectEvaluationBroadcaster

    public ProjectEvaluationListener getProjectEvaluationBroadcaster()

  Specified by:
    `getProjectEvaluationBroadcaster` in interface `org.gradle.api.internal.BuildInternal`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD