I see the following info in Eclipse package explorer:
Is it possible to change this location?
Globally you can set
[...] Gradle user home directory (defined by the “GRADLE_USER_HOME” environment variable, which [...] defaults to USER_HOME/.gradle) [...]
Otherwise for every build manually:
-g, --gradle-user-home Specifies the Gradle user home directory. The default is the .gradle directory in the user's home directory.
See https://gradle.org/docs/current/userguide/gradle_command_line.html.
You can change the cache location since gradle 3.5. This is controlled in settings.gradle file for your project:
buildCache {
local {
// Set local build cache directory.
directory = "${settingsDir}/build-cache"
}
}
You can change the location of gradle cache location in eclipse by setting the eclipse gradle preference
In Eclipse open, window-> preferences Search for 'Gradle' set 'Gradle User Home' to your preferred location Click Apply/ok
Now for the changes to take effect, you might have to do Gradle-> Refresh Gradle Project
You can't change the location of the cache specifically, but you can change the Gradle user home directory (the .gradle directory) which the cache is located in by using the -g
command line argument.
What worked for me was to edit my Windows environment variables and add variable GRADLE_USER_HOME with value d:/.gradle
. (Replace "d:/.gradle" with the path to your gradle home.) Then exit and restart Eclipse.