Growing gradle home cache - scripts and dynamic versioned artifacts

Hey there, I’d just like to clear up some gradle cache questions:

For starters I’m using ubuntu and gradle 2.6.

  1. What is the purpose of the items cached in ~/.gradle/caches/<version>/scripts? I see build and settings entries mostly. Over time this folder grows to many GBs.
  2. Is the above-mentioned scripts folder ever pruned by gradle? Would pruning it manually affect anything?
  3. Does https://docs.gradle.org/current/userguide/dependency_management.html#sec:controlling_caching imply that dynamic version artifacts will be removed from the gradle cache or just that they won’t be used after a certain period of time (default 24hrs)? From my experience it sounds like the latter. If so, is there any way to not cache such artifacts? Is there no gradle option to remove old versions of cached artifacts?

Thanks,
Willie

Any help here? I guess I’ll just clean this up manually - I just can’t find any information in the docs about what is getting cached and why (save for some basic info about caching artifacts).

In case this helps anyone we were using a plugin to download gradle scripts to be used in our build script until we had time to write them as plugins. It seems using this plugin to download the scripts is throwing off gradle’s caching - thinking its a new script every time.

apply plugin: 'com.kageiit.url-cache’
apply from: urlCache.get(‘http://somewhere.to.my.script.gradle’)