api / org.gradle.api / Project / getRootProject

getRootProject

abstract fun getRootProject(): Project

Returns the root project for the hierarchy that this project belongs to. In the case of a single-project build, this method returns this project.

Return
The root project. Never returns null.