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.testfixtures
Class ProjectBuilder

    java.lang.Object
      org.gradle.testfixtures.ProjectBuilder

    public class ProjectBuilder

extends Object

Creates dummy instances of `Project` which you can use in testing custom task and plugin implementations.

To create a project instance:

1. Create a `ProjectBuilder` instance by calling `builder()`.
2. Optionally, configure the builder.
3. Call `build()` to create the `Project` instance.

You can reuse a builder to create multiple `Project` instances.

Constructor Summary
`ProjectBuilder()`

Method Summary
`Project` | `build()` Creates the project.
`static ProjectBuilder` | `builder()` Creates a project builder.
`ProjectBuilder` | `withProjectDir(File dir)` Specifies the project directory for the project to build.

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

Constructor Detail

### ProjectBuilder

    public ProjectBuilder()

Method Detail

### builder

    public static ProjectBuilder builder()

  Creates a project builder.

  Returns:
    The builder

### withProjectDir

    public ProjectBuilder withProjectDir(File dir)

  Specifies the project directory for the project to build.

  Parameters:
    `dir` - The project directory
  Returns:
    A new ProjectBuilder.

### build

    public Project build()

  Creates the project.

  Returns:
    The project

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