spring-boot/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-junit-vintage/build.gradle
Andy Wilkinson 7d07c0d09c Polish configuration related to predictive test selection
Most notably, this commit splits the tests that use Spring REST Docs
out into a separate task for which predictive test selection is
disabled. This allows it to be cached and use Gradle's built-in
up-to-date checking, thereby avoiding the generation of new snippets
and the need to then run the asciidoctor and asciidoctorPdf tasks.

It also updates spring-boot-smoke-test-junit-vintage to disable
predictive test selection so that we can continue to assert that
the some tests were executed.

See gh-35869
2023-06-14 18:15:04 +01:00

30 lines
697 B
Groovy

plugins {
id "java"
id "org.springframework.boot.conventions"
}
description = "Spring Boot JUnit Vintage smoke test"
dependencies {
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web"))
testImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
testImplementation("org.junit.vintage:junit-vintage-engine") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
}
test {
testLogging {
afterSuite { description, result ->
if (!description.parent) {
if (!result.testCount) {
throw new GradleException("No tests were executed")
}
}
}
}
predictiveSelection {
enabled = false
}
}