ProjectLayout (Gradle API 8.14) (original) (raw)
@ServiceScope(org.gradle.internal.service.scopes.Scope.Project.class)public interface 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.
Since:
4.1
Method Summary
Returns the build directory for the project.
Returns the project directory.
Returns the settings directory.
Method Details
getProjectDirectory
Returns the project directory.
getBuildDirectory
Returns the build directory for the project.
getSettingsDirectory
Returns the settings directory.
The settings directory is the directory containing the settings file. It is shared by all projects in the build.
Since:
8.13file
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 getProjectDirectory().dir
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 getProjectDirectory().
Since:
6.0files
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.
Parameters:
paths
- The paths to the files. May be empty.
Returns:
The file collection. Never returns null.
Since:
4.8