From b2a1994f7de728d5ed917c2c600a6e13c4e647a9 Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Wed, 1 Dec 2021 14:38:25 +0000 Subject: [PATCH] Make clean remove the root build folder Closes gh-28857 --- build.gradle | 3 ++- settings.gradle | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build.gradle b/build.gradle index 58f14bb79b..9da48942a2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,5 @@ plugins { + id "base" id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276 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" } -task build { +check { dependsOn checkstyleNohttp } diff --git a/settings.gradle b/settings.gradle index 204d721b69..2a7cd02044 100644 --- a/settings.gradle +++ b/settings.gradle @@ -36,12 +36,12 @@ settings.gradle.projectsLoaded { value('Toolchain version', toolchainVersion) tag("JDK-$toolchainVersion") } - - settings.gradle.rootProject.getBuildDir().mkdirs() - new File(settings.gradle.rootProject.getBuildDir(), "build-scan-uri.txt").text = "build scan not generated" - + def buildDir = settings.gradle.rootProject.getBuildDir() + buildDir.mkdirs() + new File(buildDir, "build-scan-uri.txt").text = "build scan not generated" 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" } } }