Peter, I appreciate your responses, but I think we’re still not connecting. I do have cases where “cleanBuild” is preferable to “clean build” (related to CI) and also more complex scenarios.
So, if you started with “cleanBuild” as a requirement, how can it be met?
The argument against implementing this reminds me of the decision for Ant to not include an if clause. I’ve spent many hours coding around that decision. There may have been a good reason for this if we used Ant out of the box exactly the original developers intended. Maven takes this to an extreme where it’s easy to do things as the designers intended, but hard to do anything else. In all other things Gradle is the best of both worlds, implying, but not requiring a conventional approach. I’ve read other posts that have implied that this might prevent Gradle adaptation. A shame, because in all other ways I’ve been able to make the case that I can do anything with Gradle, but unless it’s unusual it’s probably already implemented.