Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Gradle download location

Tags:

gradle

build

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

like image 675
Ayusman Avatar asked Aug 18 '12 07:08

Ayusman


People also ask

Where do gradle downloads go?

Gradle caches artifacts in USER_HOME/. gradle folder. The compiled scripts are usually in the . gradle folder in your project folder.

How do I change the gradle path in Windows 10?

Microsoft Windows users In File Explorer right-click on the This PC (or Computer ) icon, then click Properties → Advanced System Settings → Environmental Variables . Under System Variables select Path , then click Edit . Add an entry for C:\Gradle\gradle-7.5. 1\bin .

How do I change the gradle path in Linux?

We need to add the Gradle bin directory to the system PATH environment variable. To do so, open your text editor and create a new file named gradle.sh inside of the /etc/profile. d/ directory. Save and close the file.


2 Answers

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

like image 146
Peter Niederwieser Avatar answered Sep 26 '22 02:09

Peter Niederwieser


On android studio just go to File > Settings > Build Execution, Deployment > Gradle > Service directory path choose directory what you want.

like image 24
Bachtiar Panjaitan Avatar answered Sep 25 '22 02:09

Bachtiar Panjaitan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!