Managing Gradle cache.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 02 Mar 2017 13:10:51 +0200
changeset 2108 651a45561a46
parent 2107 6f77a1808a38
child 2109 f6f8041d49d6
Managing Gradle cache.
gradle.rst
--- a/gradle.rst	Mon Feb 27 22:54:57 2017 +0200
+++ b/gradle.rst	Thu Mar 02 13:10:51 2017 +0200
@@ -166,4 +166,24 @@
 
   $ gradle -m clean compile
 
+Managing Gradle cache
+=====================
 
+Work in offline mode with ``--offline`` option.
+
+Force to re-download dependencies with ``--refresh-dependencies`` option.
+
+Alternatively remove ``~/.m2/repository/`` and ``~/.gradle/caches`` directories.
+
+Gradle cached modules declared as *changing*::
+
+  dependencies {
+    compile("com.evil:evil-api:1.0.1-SNAPSHOT") { changing=true }
+  }
+
+Default timeout is 24 hours and can be reset/changed via::
+
+  configurations.all {
+      resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
+  }
+