diff --git a/settings.gradle b/settings.gradle
index 90c976ef51..c6d53a4c85 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -55,6 +55,7 @@ include "spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"
include "spring-boot-project:spring-boot-tools:spring-boot-configuration-metadata"
include "spring-boot-project:spring-boot-tools:spring-boot-configuration-processor"
include "spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin"
+include "spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support"
include "spring-boot-project:spring-boot-tools:spring-boot-jarmode-layertools"
include "spring-boot-project:spring-boot-tools:spring-boot-loader"
include "spring-boot-project:spring-boot-tools:spring-boot-loader-tools"
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle
index 5f904bda58..030cb8f5fe 100644
--- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle
+++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/build.gradle
@@ -25,6 +25,7 @@ dependencies {
optional("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
+ testImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core")
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/build.gradle
new file mode 100644
index 0000000000..e3cb7071a5
--- /dev/null
+++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/build.gradle
@@ -0,0 +1,22 @@
+plugins {
+ id "java-library"
+ id "org.springframework.boot.conventions"
+}
+
+description = "Spring Boot Gradle Testing Support"
+
+dependencies {
+ compileOnly("org.junit.jupiter:junit-jupiter")
+
+ implementation(gradleTestKit())
+ implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
+ implementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
+ implementation("io.spring.gradle:dependency-management-plugin")
+ implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
+ implementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
+ implementation("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
+ implementation("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
+ implementation("org.apache.commons:commons-compress")
+
+ implementation("org.assertj:assertj-core")
+}
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/Dsl.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/Dsl.java
similarity index 100%
rename from spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/Dsl.java
rename to spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/Dsl.java
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java
similarity index 99%
rename from spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java
rename to spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java
index 605b1b02f6..19a1e2fbd0 100644
--- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java
+++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuild.java
@@ -65,6 +65,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* A {@code GradleBuild} is used to run a Gradle build using {@link GradleRunner}.
*
* @author Andy Wilkinson
+ * @author Scott Frederick
*/
public class GradleBuild {
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuildExtension.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuildExtension.java
similarity index 100%
rename from spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuildExtension.java
rename to spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleBuildExtension.java
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java
similarity index 100%
rename from spring-boot-project/spring-boot-tools/spring-boot-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java
rename to spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/GradleVersions.java
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/package-info.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/package-info.java
new file mode 100644
index 0000000000..31273a3f96
--- /dev/null
+++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-test-support/src/main/java/org/springframework/boot/testsupport/gradle/testkit/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2012-2021 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Classes for testing with Gradle.
+ */
+package org.springframework.boot.testsupport.gradle.testkit;
diff --git a/spring-boot-project/spring-boot-tools/spring-boot-test-support/build.gradle b/spring-boot-project/spring-boot-tools/spring-boot-test-support/build.gradle
index 922c6530a3..afcb084d11 100644
--- a/spring-boot-project/spring-boot-tools/spring-boot-test-support/build.gradle
+++ b/spring-boot-project/spring-boot-tools/spring-boot-test-support/build.gradle
@@ -20,16 +20,6 @@ dependencies {
compileOnly("org.springframework.data:spring-data-redis")
compileOnly("org.testcontainers:testcontainers")
- compileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
- compileOnly(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
- compileOnly("io.spring.gradle:dependency-management-plugin")
- compileOnly(gradleTestKit())
- compileOnly("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
- compileOnly("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
- compileOnly("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
- compileOnly("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
- compileOnly("org.apache.commons:commons-compress")
-
implementation("org.apache.maven.resolver:maven-resolver-connector-basic")
implementation("org.apache.maven.resolver:maven-resolver-impl")
implementation("org.apache.maven:maven-resolver-provider")
diff --git a/spring-boot-system-tests/spring-boot-image-tests/build.gradle b/spring-boot-system-tests/spring-boot-image-tests/build.gradle
index cd6bd8a4a6..2e264fc183 100644
--- a/spring-boot-system-tests/spring-boot-image-tests/build.gradle
+++ b/spring-boot-system-tests/spring-boot-image-tests/build.gradle
@@ -26,16 +26,9 @@ dependencies {
}
systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
- systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
+ systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support"))
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
- systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
- systemTestImplementation("io.spring.gradle:dependency-management-plugin")
systemTestImplementation(gradleTestKit())
- systemTestImplementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
- systemTestImplementation("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
- systemTestImplementation("org.jetbrains.kotlin:kotlin-compiler-embeddable:$kotlinVersion")
- systemTestImplementation("org.jetbrains.kotlin:kotlin-compiler-runner:$kotlinVersion")
- systemTestImplementation("org.jetbrains.kotlin:kotlin-daemon-client:$kotlinVersion")
systemTestImplementation("org.assertj:assertj-core")
systemTestImplementation("org.testcontainers:junit-jupiter")
systemTestImplementation("org.testcontainers:testcontainers")
diff --git a/src/checkstyle/checkstyle-suppressions.xml b/src/checkstyle/checkstyle-suppressions.xml
index bdbeedc22d..d51becd4dd 100644
--- a/src/checkstyle/checkstyle-suppressions.xml
+++ b/src/checkstyle/checkstyle-suppressions.xml
@@ -46,6 +46,7 @@
+