How to change projectCacheDir location from an init script


(Chip Dickson) #1

Hi all, I have 100+ native projects that have a particular project layout that is causing me to hit an MD5 error (this issue: https://github.com/gradle/gradle/issues/5972) as it relates to the .gradle projectCacheDir.

I have tried to use the init.gradle file to set the start parameter, but it appears to be ignored. I have validated that the directory is changed, thought perhaps it had to be created, so created it then set it, but it is always ignored, no matter what the start parameter is set to. Anyone know how this can be done from an init script? The example from this post (Latest point at which projectCacheDir can be set) doesn’t work, it shows the dir is changed, but the .gradle cache is still written to the default location. Any help or insight is much appreciated.