gradlew - How to use gradle zip in local system without downloading when using gradle-wrapper -
i'm trying build gradle project gradle-wrapper (gradlew
).
when build ./gradlew build
, outputs text
downloading http://services.gradle.org/distributions/gradle-1.11-bin.zip
and got gradle-1.11-bin.zip downloaded separately , don't want downloading again when build.
so, shall put gradle-1.11-bin.zip in project or system don't have download again?
gradle/wrapper/gradle-wrapper.properties following.
distributionbase=gradle_user_home distributionpath=wrapper/dists zipstorebase=gradle_user_home zipstorepath=wrapper/dists distributionurl=http\://services.gradle.org/distributions/gradle-1.11-bin.zip
and i've tried copying gradle-1.11-bin.zip gradle/wrapper/dists didn't solve problem.
from gradle-wrapper documentation, found in section 61.1. configuration
if don't want download happen when project build via gradlew, add gradle distribution zip version control @ location specified wrapper configuration. relative url supported - can specify distribution file relative location of gradle-wrapper.properties file.
so, changed distributionurl
property in gradle-wrapper.properties
to
distributionbase=gradle_user_home distributionpath=wrapper/dists zipstorebase=gradle_user_home zipstorepath=wrapper/dists distributionurl=gradle-1.11-bin.zip
then, made copy of gradle-1.11-bin.zip
in gradle/wrapper/
.
then, ./gradlew build
downloaded local copy of zip , built project.
Comments
Post a Comment