Reputation: 5480
I want to look at the jars/aars that are compiled when I add dependencies.
For example if I add this dependency in Gradle, where does it put the jar?
dependencies {
compile 'com.google.android.gms:play-services-analytics:11.0.4'
}
Upvotes: 53
Views: 39167
Reputation: 2113
The format for the jar is ~/.gradle/caches/modules-2/files-2.1/<com.org.pkg>/<uuid>/
If you are using Intellij IDEA, then browse the jar on the Project window
Right-click on the jar and open in terminal.
Run the pwd
command in terminal to find the location.
Video guide - How to find dependent jar on local when using gradle
Upvotes: 1
Reputation: 15682
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).
Upvotes: 67
Reputation: 10152
Open your Android Studio Project Explorer
, expand External Libraries
sections. Right click and Show in Files/Explorer
Upvotes: 14
Reputation: 930
Generally, you can find in:
%USERPROFILE%/.gradle/caches/modules-2/files-2.1
Upvotes: 30