ProjectLayout (Gradle API 7.6.3)

Package org.gradle.api.file

## Interface ProjectLayout

-     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()`.

  Since:
    4.1

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `Provider<Directory>` | `dir​(Provider<java.io.File> file)` | Creates a `Directory` provider whose location is calculated from the given `Provider`.
    `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.

- - ### Method Detail

    - #### getProjectDirectory

          Directory getProjectDirectory()

      Returns the project directory.

    - #### getBuildDirectory

          DirectoryProperty getBuildDirectory()

      Returns the build directory for the project.

    - #### file

          Provider<RegularFile> file​(Provider<java.io.File> file)

      Creates a `RegularFile` provider whose location is calculated from the given `Provider`.

    - #### dir

          Provider<Directory> dir​(Provider<java.io.File> file)

      Creates a `Directory` provider whose location is calculated from the given `Provider`.
      Since:
        6.0

    - #### files

          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.

      Parameters:
        `paths` - The paths to the files. May be empty.
      Returns:
        The file collection. Never returns null.
      Since:
        4.8