Make clean remove the root build folder

Closes gh-28857
This commit is contained in:
Andy Wilkinson 2021-12-01 14:38:25 +00:00
parent 8322dda8cc
commit b2a1994f7d
2 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,5 @@
plugins { plugins {
id "base"
id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276 id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276
id "io.spring.nohttp" version "0.0.10" id "io.spring.nohttp" version "0.0.10"
} }
@ -16,7 +17,7 @@ nohttp {
source.exclude "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/export.tar" source.exclude "spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/resources/org/springframework/boot/buildpack/platform/docker/export.tar"
} }
task build { check {
dependsOn checkstyleNohttp dependsOn checkstyleNohttp
} }

View File

@ -36,12 +36,12 @@ settings.gradle.projectsLoaded {
value('Toolchain version', toolchainVersion) value('Toolchain version', toolchainVersion)
tag("JDK-$toolchainVersion") tag("JDK-$toolchainVersion")
} }
def buildDir = settings.gradle.rootProject.getBuildDir()
settings.gradle.rootProject.getBuildDir().mkdirs() buildDir.mkdirs()
new File(settings.gradle.rootProject.getBuildDir(), "build-scan-uri.txt").text = "build scan not generated" new File(buildDir, "build-scan-uri.txt").text = "build scan not generated"
buildScanPublished { scan -> buildScanPublished { scan ->
new File(settings.gradle.rootProject.getBuildDir(), "build-scan-uri.txt").text = "<${scan.buildScanUri}|build scan>\n" buildDir.mkdirs()
new File(buildDir, "build-scan-uri.txt").text = "<${scan.buildScanUri}|build scan>\n"
} }
} }
} }