After adding a dependency to a .gradle file, our build server started having issues with the following being logged:
FAILURE: Build failed with an exception. * What went wrong: Could not open buildscript class cache for build file '/u01/apps/.jenkins/workspace/[path name snipped]/build.gradle' (/home/[username]/.gradle/caches/1.3/scripts/build_5jii90b0hvl37q9m8vfhik495b/ProjectScript/buildscript). > java.io.EOFException
We were able to resolve it by clearing the gradle cache on the build slaves. However, I'm concerned that this is just a temporary fix and it might show up again. Is there a better way to fix this issue?
go to location ".gradle\caches\2.0\scripts\build_7l4t45nbnsvdcl79ol8u0beli4\ProjectScript" and remove cache.properties.lock file
That exception typically occurs due to corrupted cache files.
Deleting the cache do work in most cases.
Linux
rm -rf ~/.gradle/caches
Windows
Delete the %USER_HOME%.gradle/caches
folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With