.gradle retains multiple copies of Gradle distributions
Asked Answered
F

0

4

I'm using the Gradle wrapper to build various projects and noticed that my .gradle directory now contains multiple copies of each Gradle distribution. Each copy is in a unique subdirectory as shown:

enter image description here

This has happened with every version of Gradle that I have under .gradle, up through gradle-2.2.1-all. Why do these copies exist and how are they selected by the Gradle wrapper?

The only evidence I've found is the Gradle documentation for distributionUrl:

The wrapper downloads a certain distribution only once and caches it.

These subdirectories may be a hash computed from the distributionUrl in gradle-wrapper.properties. http and https variants of the URL could contribute up to two copies, which is the number of copies that most of my distributions have. That doesn't explain the third copy in gradle-1.12-all though.

Firenze answered 5/2, 2015 at 8:24 Comment(3)
The folder name is indeed a hash computed from the URL value. It could be something as simple as the wrapper properties file using different character encodings.Shluh
It's an open issue: issues.gradle.org/browse/GRADLE-3196Lamellirostral
Possible duplicate of Why there are multiple copies for the same version of gradleLamellirostral

© 2022 - 2024 — McMap. All rights reserved.