Make DistributionLocator configurable for Wrapper

In a business environment, I expect that it is typical to host the Gradle distributions on the internal network, rather than using the Gradle website.

Right now you have the option to configure the wrapper in two key ways:

wrapper {
  distributionUrl = 'http://internalsite.blah/gradle/'
  gradleVersion = '1.8' // always goes against Gradle site

It would be nice to be able to change either the root URL for the distributions or provide our own DistributionLocator so we can customize this for our environment. That way we could set it in an init script or plugin to avoid script authors from hard coding the location into every build script.

1 Like