I have a project that is one of many loosely-coupled projects, all projects are compiled in a certain order outside of gradle using a simple script. I.e. these are not part of a Gradle multi-project build with sub-projects.
Project 1 will build an asset that is consumed by Project 2 (as a normal dependency)
The problem is the very first time you check out the code, if you run a ‘clean’ none of the assets exist yet and so Project 2 complains that the dependency can’t be found. It doesn’t need the dependencies to do a clean though!
For now I have hacked around it by specifying a property on the command line -PnoDependencies=true when doing a clean. And just wrapping my dependency declarations with a check to make sure that property isn’t set. I expected Gradle to realize that the dependencies weren’t needed (they are never referenced in any task that runs as part of a clean).