Invalidate build if build.gradle configuration was changed

This is the designed behavior. Tasks are UP-TO-DATE so long as the inputs and outputs don’t change. However, we have no way of knowing whether your changes to the build script might change the way the outputs are created (ex. I modify the implementation of a custom task). We certainly do not want any modification made to the build script to cause all tasks to be out of date. Generally, simple builds script changes do affect inputs (modifying dependencies, properties, adding/removing flavors, etc) which will cause the appropriate tasks to be executed again. Depending on the change you make you have to a) perform a clean before the next build or b) add/remove any related task inputs/outputs.