Mercurial > public > develkit
diff init20.gradle @ 195:a7a7d0e263d6
allow private setting of changing/dynamic cache lifetime.
author | smith@nwoca.org |
---|---|
date | Tue, 21 Jul 2015 19:56:51 +0100 |
parents | 0c0b1413ea70 |
children | 57edc00a90b8 |
line wrap: on
line diff
--- a/init20.gradle Thu Jun 04 16:56:19 2015 +0100 +++ b/init20.gradle Tue Jul 21 19:56:51 2015 +0100 @@ -71,7 +71,13 @@ gradle.environment.put('branchStream', gradle.branch.stream) gradle.environment.put('branchHash', gradle.branch.hash) +def cacheTimeout = 60 * 60 * 8 +if (gradle.environment['dependencyTimeout']) { + cacheTimeout = gradle.environment['dependencyTimeout'] as Integer + println "setting dependency timeout to $cacheTimeout seconds" +} +gradle.ext.cacheTimeout = cacheTimeout rootProject.ext.indyCapable = { boolean capable = true @@ -337,8 +343,8 @@ } configurations.all { - resolutionStrategy.cacheChangingModulesFor 60 * 60 * 8, 'seconds' - resolutionStrategy.cacheDynamicVersionsFor 60 * 60 * 8, 'seconds' + resolutionStrategy.cacheChangingModulesFor gradle.cacheTimeout, 'seconds' + resolutionStrategy.cacheDynamicVersionsFor gradle.cacheTimeout, 'seconds' } repositories {