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:
ProjectBuilder instance by calling builder().build() to create the Project instance.You can reuse a builder to create multiple Project instances.
| Constructor and Description |
|---|
ProjectBuilder() |
| Modifier and Type | Method and Description |
|---|---|
Project |
build()
Creates the project.
|
static ProjectBuilder |
builder()
Creates a project builder.
|
ProjectBuilder |
withName(String name)
Specifies the name for the project
|
ProjectBuilder |
withParent(Project parent)
Specifies the parent project.
|
ProjectBuilder |
withProjectDir(File dir)
Specifies the project directory for the project to build.
|
public static ProjectBuilder builder()
public ProjectBuilder withProjectDir(File dir)
dir - The project directorypublic ProjectBuilder withName(String name)
name - project namepublic ProjectBuilder withParent(Project parent)
parent - parent projectpublic Project build()