gradle
8.3

# getGradleHomeDir

@Nullable
abstract fun getGradleHomeDir(): File

Returns the Gradle home directory, if any. This directory is the directory containing the Gradle distribution executing this build.

When using the “Gradle Daemon”, this may not be the same Gradle distribution that the build was started with. If an existing daemon process is running that is deemed compatible (e.g. has the desired JVM characteristics) then this daemon may be used instead of starting a new process and it may have been started from a different “gradle home”. However, it is guaranteed to be the same version of Gradle. For more information on the Gradle Daemon, please consult the User Manual.

#### Return

The home directory. May return null.