Is it possible to move .gradle out of my roaming profile


(Matthieu Smith) #1

Hello, I work in a company where we have roaming profile and we are discouraged to put stuff there that is for our development setups.

I am currently working with Android Studio as IDE and was able to move the few things it had in the roaming profile out to my D drive but was unable to do so with gradle.

Now i read a lot on this subject and many people say to add the environment variable GRADLE_USER_HOME i did that but still didn’t change anything except when i run gradle in command line then it downloads a version to that new location but the one in the roaming profile is still used.

Is there a way to fix this or i need to wait for an update from gradle to change this?

Thanks for your time


(Peter Niederwieser) #2

Setting ‘GRADLE_USER_HOME’ is the way to go, and is commonly used to fix the roaming profile problem. Hence I’d be very surprised if it didn’t work.


(Matthieu Smith) #3

This is my environment variable setup

After i did this i delete the .gradle file under my user and start android studio again the only this that kept appearing in .gradle is the distribution zip

this is my gradle-wrapper.properties file

#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

zipStoreBase seems to be ignoring what i set is this normal?


(Peter Niederwieser) #4

So the distribution zip is the only problem? (There are a lot more things stored under the Gradle user home). I’d expect ‘zipStoreBase=GRADLE_USER_HOME’ to work. Can you verify with plain Gradle (i.e. outside Android Studio)?


(Matthieu Smith) #5

Sure how would i do that?


(Peter Niederwieser) #6

Run ‘gradlew build’ in your project directory.


(Matthieu Smith) #7

indeed so after running the build i checked if the .gradle folder was there and it wasn’t so outside of android studio it is fine but the second i open android studio it come back


(Radim Kubacki) #8

You can customize your IDE to use your GRADLE_USER_HOME_DIR (Project settings | Gradle | Service directory path). It will probably still try to download the distribution into default location but will use the value you specified for other purposes. Distribution downloading will be fixed when IDEA updates its version of toolingApi to get the fix for http://issues.gradle.org/browse/GRADLE-2414