api / org.gradle.api.initialization

Package org.gradle.api.initialization



interface ConfigurableIncludedBuild : IncludedBuild

A build that is to be included in the composite.


interface IncludedBuild

A build that is included in the composite.


interface ProjectDescriptor

A ProjectDescriptor declares the configuration required to create and evaluate a .

A ProjectDescriptor is created when you add a project to the build from the settings script, using or Settings#includeFlat(String...). You can access the descriptors using one of the lookup methods on the Settings object.


interface Settings : PluginAware

Declares the configuration required to instantiate and configure the hierarchy of instances which are to participate in a build.

There is a one-to-one correspondence between a Settings instance and a {@value * #DEFAULT_SETTINGS_FILE} settings file. Before Gradle assembles the projects for a build, it creates a Settings instance and executes the settings file against it.

Assembling a Multi-Project Build

One of the purposes of the Settings object is to allow you to declare the projects which are to be included in the build. You add projects to the build using the #include(String...) method. There is always a root project included in a build. It is added automatically when the Settings object is created. The root project's name defaults to the name of the directory containing the settings file. The root project's project directory defaults to the directory containing the settings file.

When a project is included in the build, a ProjectDescriptor is created. You can use this descriptor to change the default values for several properties of the project.

Using Settings in a Settings File Dynamic Properties

In addition to the properties of this interface, the Settings object makes some additional read-only properties available to the settings script. This includes properties from the following sources:

  • Defined in the {@value org.gradle.api.Project#GRADLE_PROPERTIES} file located in the settings directory of the build.
  • Defined the {@value org.gradle.api.Project#GRADLE_PROPERTIES} file located in the user's .gradle directory.
  • Provided on the command-line using the -P option.