For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

getLayout

abstract fun getLayout(): ProjectLayout(source)

Provides access to the project layout when default configurations are evaluated in the context of specific projects.

Meant to be used only inside the defaults{} block in settings scripts. If used in other contexts, behaviour is undefined.

Since

8.14