Are there any drawbacks of sharing the Gradle user home amongst multiple developers on the same filesystem?
I have just found this comment by Gradle developer Stefan Oehme wrt. sharing the Gradle user home:
Gradle processes will hold locks if they are uncontended (to gain performance). Contention is announced through inter-process communication, which does not work when the processes are isolated in Docker containers.
And more clearly he states in a follow-up comment (highlighting by me):
There might be other issues that we haven't yet discovered though, since sharing a user home between machines is not a use case we have designed for.
In other words: sharing a Gradle user home or even just the cache part of it across different machines is currently not officially supported by Gradle.
The Gradle user home is still not meant to be shared, however, it is now at least “perfectly possible to copy a cache around” (cf. the user guide). Not sure what that means for concurrent access from different hosts; it still provides a basis for more sharing scenarios than were officially supported before.
As you reference ~/.gradle/
, I guess you are on a *nix machine?
Then simply make the cache folder a symlink to some shared folder and you will be fine. Cache will be shared and each dev still has his own Gradle user home.