I use gradle in my microservice project. When I open project in IntelliJ IDEA, I see "often" (a few times per month) missing dependencies even I downloaded them in the past. With tens of microservicies, it is painful to open project, see half of dependencies are missing and need to download them again. I think it is due to cache cleaning as described https://docs.gradle.org/current/userguide/directory_layout.html . If yes, I want to know, if there is possibility to tune parameters, so it does not clean itself so often (yes, one month is very often).
CodePudding user response:
Cache cleanup can only be disable at the time of writing (Gradle 7.2). For this you need to create the $GRADLE_USER_HOME/gradle.properties
file with the following content:
org.gradle.cache.cleanup=false
If not configured explicitly, $GRADLE_USER_HOME
points to .gradle
in your user's home directory (~/.gradle
, C:\Users\Username
, etc.).
Feature request for fine-granular cache cleanup policy is filed in Make periodic cache cleanup retention times configurable #7018.