Because Gradle is so smart about what changed in a project between builds, and therefore what it can skip because it’s already correct (class files, XSD code gen etc), it’s tempting to not do a “clean” for CI builds, as this will significantly speed up the build. On the other hand, you run an increased risk of certain stale artifacts being included in the build due to unforseen reasons or change vectors Gradle doesn’t consider.
So, what’s the best practice here? Should I always do a “gradle clean” before every CI build?
Thanks in advance, Maarten