Reputation: 8719
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
Upvotes: 88
Views: 76282
Reputation: 415
On android studio just go to File > Settings > Build Execution, Deployment > Build Tools > Gradle > Service directory path choose directory what you want.
Upvotes: 13
Reputation: 5042
If you want to run gradle tasks through IDE then: You can also set in intelliJ editor>File>settings:
Then restart the IDE.
If you want to run gradle tasks through command line then you have to set GRADLE_USER_HOME in environment system variables. Then restart the pc as others also said.
Upvotes: 2
Reputation: 525
Steps:
Upvotes: 6
Reputation: 828
You can add following line to your gradle.properties
:
systemProp.gradle.user.home=/tmp/changed-gradle
Upvotes: 5
Reputation: 304
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.
Upvotes: 0
Reputation: 71
You can also try to go in eclipse at window ->preferences -> gradle and change the directory there
Upvotes: 4
Reputation: 123910
You can set the GRADLE_USER_HOME
environment variable, gradle.user.home
system property, or --gradle-user-home
command line parameter.
Upvotes: 115