I use the Gradle shell to create various projects and noticed that my .gradle directory now contains several copies of each Gradle distribution. Each copy is in a unique subdirectory, as shown:

This happened with every version of Gradle that I have under .gradle , up gradle-2.2.1-all . Why do these copies exist and how are they selected by the Gradle shell?
The only evidence I found is the Gradle documentation for distributionUrl :
The wrapper downloads a specific distribution only once and caches it.
These subdirectories can be a hash computed from distributionUrl in gradle-wrapper.properties . http and https URL options can contribute up to two copies, that is, the number of copies that most of my distributions have. This does not explain the third copy in gradle-1.12-all , though.
source share