[GRADLE-909] Dependency Cache Broken Created: 16/Apr/10 Updated: 04/Jan/13 Resolved: 24/Nov/10
|Reporter:||Steve Appling||Assignee:||Adam Murdoch|
The up-to-date checks using the cache are not currently reliable. In particular, a clean does not always trigger a rebuild.
Here is a sequence that can reproduce the problem with the java quickstart sample:
Go to the quickstart sample and run 'gradle build'. - this makes sure you have the output classes
Then delete the .gradle cache directory. (This simulates changing to a new version of gradle where a new subdirectory is used underneath the .gradle dir).
Now do 'gradle build' - this will create the caches (and seems to cache that the output files are there).
Now do 'gradle clean build' - the build will fail because it thinks compileJava is UP-TO-DATE.
It is now stuck in a state where it always thinks it is up to date.
Deleting the cache manually (or using -C rebuild option) can get around the problem for that run, but you can run into similar issues later. Currently it seems you have to do -C rebuild every time to consistently avoid this.
|Comment by Steve Appling [ 16/Apr/10 ]|
In a private email, Adam said he would look into this. Assigning to him.
|Comment by Adam Murdoch [ 17/Apr/10 ]|
To unstick the cache, use gradle -C rebuild clean. It should be fine after that. It is important to use both -C rebuild and clean at the same time.