api / org.gradle.tooling / GradleConnector / useBuildDistribution

useBuildDistribution

abstract fun useBuildDistribution(): GradleConnector

Specifies to use the Gradle distribution defined by the target Gradle build. The appropriate distribution defined by the target Gradle build is downloaded and installed into the user's Gradle home directory. If the target Gradle build does not define the distribution that it should be built with, the Gradle version of this connector is used. This replaces any value specified using #useInstallation(File), #useDistribution(URI), or #useGradleVersion(String). Acts as the default behavior.

Return
this

Since
2.3