api / org.gradle.api.tasks.wrapper / Wrapper / setDistributionUrl

setDistributionUrl

open fun setDistributionUrl(url: String): Unit

The URL to download the gradle distribution from.

If not set, the download URL is the default for the specified #getGradleVersion().

If #getGradleVersion() is not set, will return null.

The wrapper downloads a certain distribution only once and caches it. If your distribution base is the project, you might submit the distribution to your version control system. That way no download is necessary at all. This might be in particular interesting, if you provide a custom gradle snapshot to the wrapper, because you don't need to provide a download server then.