Changes to buildSrc directory are not always detected

To reproduce, write a build that is successfully using some code from buildSrc/src/main/java.

Now rename buildSrc/src into buildSrc/foo. The build will still work as before. Delete buildSrc/build. Now the build will fail (correctly) because the code from buildSrc is missing. Rename buildSrc/foo back to buildSrc/src. Now the build will work again.

We discovered this issue while playing around with 21-Organizing-Build-Logic during our Gradle training.

Confirmed, thanks for the report. Raised as GRADLE-2531.

Turns out that this is a duplicate of GRADLE-2579. I’m closing GRADLE-2531 as a duplicate of this.