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' }
Gradle declares dependencies on JAR files inside your project's module_name /libs/ directory (because Gradle reads paths relative to the build.gradle file). This declares a dependency on version 12.3 of the "app-magic" library, inside the "com.example.android" namespace group.
The Gradle Build Cache is designed to help you save time by reusing outputs produced by previous builds. It works by storing (locally or remotely) build outputs, and allowing builds to fetch these outputs from the cache when it determines that inputs have not changed.
gradle file is located inside your project folder under app/build.
gradle folder location for Android studio, you must: Define the GRADLE_USER_HOME environment variable to point to C:\WorkFolder\ . gradle.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With