api / org.gradle.api.initialization / ProjectDescriptor

ProjectDescriptor

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.

Functions

getBuildFile

abstract fun getBuildFile(): File

Returns the build file for this project.

getBuildFileName

abstract fun getBuildFileName(): String

Returns the name of the build file for this project. This name is interpreted relative to the project directory.

getChildren

abstract fun getChildren(): MutableSet<ProjectDescriptor>

Returns the children of this project, if any.

getName

abstract fun getName(): String

Returns the name of this project.

getParent

abstract fun getParent(): ProjectDescriptor

Returns the parent of this project, if any. Returns null if this project is the root project.

getPath

abstract fun getPath(): String

Returns the path of this project. The path can be used as a unique identifier for this project.

getProjectDir

abstract fun getProjectDir(): File

Returns the project directory of this project.

setBuildFileName

abstract fun setBuildFileName(name: String): Unit

Sets the name of the build file. This name is interpreted relative to the project directory.

setName

abstract fun setName(name: String): Unit

Sets the name of this project.

setProjectDir

abstract fun setProjectDir(dir: File): Unit

Sets the project directory of this project.