

The files are not automatically deleted and they do not really need to be retained.īut you can create a small gradle task to automatically delete them, and free up lots of disk space:Īdd this to your app/adle: android ").listFiles(). The total size can grow to several hundred MB in just a few months. "X.X" is the gradle version in use, like "7.5", and "XXXX" are just random numbers, like "1234". The gradle daemon also creates a many large text files of every single build log. Please see the related system info how to execute the scripts: Download the Android Studio using the below link. NOTE: gradle / gradlew are system specific files containing scripts. Download Android Studio: In this tutorial, we are going to see, how to install the Android Studio on macOS. NOTE: The cleanBuildCache task is not available if you disable the build cache.Īndroid Studio / IntelliJ: gradle tab (default on right) select and run the task or add it via the configuration window To learn more, read Improve Build Speed with Build Cache. Projects using Android plugin 2.3.0 and higher use the build cache by default. Your clean builds are much faster while using the cache because the build system can simply reuse those cached files during subsequent builds, instead of recreating them. Stores certain outputs that the Android plugin generates when building your project (such as unpackaged AARs and pre-dexed remote dependencies). Newest solution using Gradle task: cleanBuildCacheĪvailable via Android plugin for Gradle, revision 2.3.0 (February 2017) Other digressions: see here (including edits).

Android Gradle plugin now utilizes Gradle cache featureĬlean the cache directory to avoid any hits from previous builds rm -rf $GRADLE_HOME/caches/build-cache-*
