Table of Contents
| API Documentation: | ProjectLayout |
|---|
Provides access to several important locations for a project.
An instance of this type can be injected into a task, plugin or other object by annotating a public constructor or method with javax.inject.Inject. It is also available via Project.getLayout().
Note: This interface is not intended for implementation by build script or plugin authors.
| Property | Description |
buildDirectory | The build directory for the project. |
projectDirectory | The project directory. |
settingsDirectory | Incubating The settings directory. |
| Method | Description |
dir(file) | Creates a |
file(file) | Creates a |
files(paths) | Creates a read-only |
DirectoryProperty buildDirectory
The build directory for the project.
Directory projectDirectory (read-only)
The project directory.
Directory settingsDirectory (read-only)
Note: This property is incubating and may change in a future version of Gradle.
The settings directory.
The settings directory is the directory containing the settings file. It is shared by all projects in the build.
Creates a Directory provider whose location is calculated from the given Provider.
File system locations based on relative paths will be
resolved against this layout's reference location, as defined by ProjectLayout.getProjectDirectory().
Provider<RegularFile> file(Provider<File> file)
Provider<RegularFile>Provider<File>Creates a RegularFile provider whose location is calculated from the given Provider.
File system locations based on relative paths will be
resolved against this layout's reference location, as defined by ProjectLayout.getProjectDirectory().
FileCollection files(Object... paths)
Object...Creates a read-only FileCollection containing the given files, as defined by Project.files(java.lang.Object[]).
This method can also be used to create an empty collection, but the collection may not be mutated later.