Question
In a Nutshell
Are there any drawbacks of sharing the Gradle user home amongst multiple developers on the same filesystem?
In More Detail
Our goal is to save disk space with the local Gradle cache. The Gradle user guide suggests that the cache is safe for concurrent access. There doesn’t currently seem to be any way to configure the cache location independently from the Gradle user home, so essentially the question boils down to sharing the Gradle user home (defaults to ~/.gradle/
). In a quick test we could verify that multiple concurrent processes of the same user do indeed work flawlessly with a single Gradle user home.
But could there be any problems with multiple users? I could imagine that permission issues might become a problem. Does anyone have any experience with such a setup? Are there any files in the Gradle user home which shouldn’t be shared?
It’s clear that certain user-specific configurations wouldn’t be possible anymore with a shared user home (like personalized init scripts or gradle.properties
). Do you perhaps have any better suggestion for saving disk space with the local Gradle cache? Such a suggestion could be to somehow automatically prune the cache of each user as asked in this SO question.
Background
We use Gradle for working with somewhat bigger binary files (currently ~500M each and growing). This includes building them from other big binary artifacts as input dependencies. We store our build artifacts in Artifactory; uploading and downloading goes pretty smoothly. However, since we have about 50 developers who are mixing and matching many files every week, the local Gradle cache of each developer grows rather quickly. As all developers work on the same filesystem, we were thinking about having a shared Gradle cache for all developers to save disk space.