Where does gradle save dependencies' jars?
BY DEFAULT
Linux:
~/.gradle/caches/modules-2/files-2.1
Windows:
%USERPROFILE%/.gradle/caches/modules-2/files-2.1
Mac:
~/.gradle/caches/modules-2/files-2.1
Android:
no idea... can anyone edit?
SETTING TO SOMETHING ELSE
But you can override these default settings by setting GRADLE_USER_HOME
. The latter environment variable, if set, is NOT the same as GRADLE_HOME
, which is the path to the directory containing the bin/
directory for the Gradle version your system is using at the command prompt (NB instead of invoking Gradle directly at the command line most people seem to use the Gradle wrapper however: $ ./gradlew build
).
RUNNING GRADLE IN AN IDE
IDEs may be using a different version and be storing dependency jars somewhere else. I only know Eclipse. Having installed Buildship ("Eclipse Plug-ins for Gradle") the place to go is Window --> Preferences --> Gradle. There is a box here for you to specify "Gradle User Home". Mine is currently empty. I presume it is using the system GRADLE_USER_HOME
(which I have indeed set)... but I haven't bothered checking: although it is possible to run Gradle tasks from within Eclipse to me it is more handy to run Gradle commands in a separate Terminal (*nix)/Command Prompt window ('Doze).
Generally, you can find in:
%USERPROFILE%/.gradle/caches/modules-2/files-2.1