Running gradlew clean on the top-level folder does not remove the build folder located right under the top-level folder. That's because the root build.gradle file does not apply the base plugin.

Applying the base plugin and changing line 20 to: build.dependsOn checkstyleNohttp

will fix the problem, but it creates a consecutive problem: when running only the clean command:

WARNING: Error invoking build scan buildScanPublished action
        /Users/etiennestuder/Development/git/thirdparty/spring-boot/build/build-scan-uri.txt (No such file or directory)
https://ge.spring.io/s/2os3dgeef27zs

I'm sure @wilkinsona will will know best how to fix this scenario.

As an alternative to applying the base plugin, you could specify the following in your root build.gradle file:

tasks.register('clean', Delete) {
    delete rootProject.buildDir     
}

Comment From: etiennestuder

Nice. Thanks, @wilkinsona.