gradle Gradle Wrapper Use locally served Gradle in the Gradle Wrapper


If you want to keep on-premises copy of the Gradle and let the Wrapper use it in the builds, you can set the distributionUrl pointing to your copy on the wrapper task:

task wrapper(type: Wrapper) {
    gradleVersion = '2.0'
    distributionUrl = "http\://server/dadada/gradle-${gradleVersion}"

after executing gradle wrapper, the shell script gradlew is created and the gradle/wrapper/ is configured to use provided URL to download the Gradle.