I am starting to learn gradle.
However when I am building Spring with Gradle; it downloads the dependency jars to
C:\Users\UserName\.gradle
Is there any way I can specify Gradle to download the dependency jars to a specific location?
Just like I can specify repository location in Maven.
System information:
Windows 7 64bit
Gradle version 1.0
You can set the GRADLE_USER_HOME
environment variable, gradle.user.home
system property, or --gradle-user-home
command line parameter.
You can also try to go in eclipse at window ->preferences -> gradle and change the directory there
On android studio just go to File > Settings > Build Execution, Deployment > Gradle > Service directory path choose directory what you want.
If you are using gradle plugin in your eclipse and trying to import the gradle project than your gradle home is set to
C:\Users\UserName.gradle
In some cases your import build model will not work because of your user directory permission issue.
In this case you can copy your .gradle directory from below path
C:\Users\UserName\**.gradle**
paste into some directory where you have all permission and import the project.
In my case i moved my .gradle dir to z drive and than imported the project than made build model and it worked.
You can add following line to your gradle.properties
:
systemProp.gradle.user.home=/tmp/changed-gradle