public interface ProjectLayout
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.
| Modifier and Type | Method | Description |
|---|---|---|
Provider<Directory> |
dir(Provider<java.io.File> file) |
|
Provider<RegularFile> |
file(Provider<java.io.File> file) |
Creates a
RegularFile provider whose location is calculated from the given Provider. |
FileCollection |
files(java.lang.Object... paths) |
Creates a read-only
FileCollection containing the given files, as defined by Project.files(Object...). |
DirectoryProperty |
getBuildDirectory() |
Returns the build directory for the project.
|
Directory |
getProjectDirectory() |
Returns the project directory.
|
Directory getProjectDirectory()
DirectoryProperty getBuildDirectory()
Provider<RegularFile> file(Provider<java.io.File> file)
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 getProjectDirectory().
Provider<Directory> dir(Provider<java.io.File> file)
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 getProjectDirectory().
FileCollection files(java.lang.Object... paths)
Creates a read-only FileCollection containing the given files, as defined by Project.files(Object...).
This method can also be used to create an empty collection, but the collection may not be mutated later.
paths - The paths to the files. May be empty.