How to Change Gradle Download Location

I am starting to learn gradle. However, when I create Spring using Gradle; it loads dependency bans on

C:\Users\UserName\.gradle 

Can Gradle be specified to load dependency banks in a specific location? Just like I can specify the repository location in Maven.

System Information: Windows 7 64bit Gradle version 1.0

+46
build gradle
Aug 18 '12 at 7:11
source share
4 answers

You can set the GRADLE_USER_HOME environment GRADLE_USER_HOME , the system property gradle.user.home or the --gradle-user-home command-line option.

+63
Aug 18 2018-12-18T00:
source share

You can also try going into eclipse in the window → preferences → gradle and change the directory there

+3
Mar 04 '15 at 9:15
source share

If you use the gradle plugin in your eclipse and are trying to import a gradle project, than your home gradle is set to

C: \ Users \ UserName.gradle

In some cases, your import build model will not work due to access rights to your directory.

In this case, you can copy the .gradle directory from the bottom path

 C:\Users\UserName\**.gradle** 

paste into any directory where you have all permissions and import the project.

In my case, I moved my .gradle-disk to a z-disk and imported the project, which made the build model, and it worked.

0
Jan 25 '16 at 9:16
source share

You can add the following line to gradle.properties :

 systemProp.gradle.user.home=/tmp/changed-gradle 
0
Oct. 15 '17 at 18:46
source share



All Articles