spring-boot/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/build.gradle
Andy Wilkinson 8c3820f87e Fix up-to-date checking of syncAppSource tasks
Previously, the project version was used while filtering the apps
source during syncing but it was not considered as an input to
the task. This could result in the syncing being skipped even though
the project's version had changed.

This commit introduces a new custom task to make the configuration
more declarative and to allow the necessary input configuration to be
done in a single place.

Closes gh-28197
2021-10-05 11:08:22 +01:00

64 lines
2.5 KiB
Groovy

plugins {
id "java"
id "org.springframework.boot.conventions"
id "org.springframework.boot.integration-test"
}
description = "Spring Boot Server Integration Tests"
toolchain {
maximumCompatibleJavaVersion = JavaLanguageVersion.of(15)
}
configurations {
testRepository
}
dependencies {
intTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
intTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-test-support"))
intTestImplementation("org.apache.httpcomponents:httpasyncclient")
intTestImplementation("org.awaitility:awaitility")
intTestImplementation("org.springframework:spring-web")
testRepository(project(path: ":spring-boot-project:spring-boot-dependencies", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-jetty", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-json", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-parent", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-tomcat", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-undertow", configuration: "mavenRepository"))
testRuntimeOnly(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-logging"))
}
task syncTestRepository(type: Sync) {
destinationDir = file("${buildDir}/test-repository")
from {
configurations.testRepository
}
}
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
sourceDirectory = file("spring-boot-server-tests-app")
destinationDirectory = file("${buildDir}/spring-boot-server-tests-app")
}
task buildApps(type: GradleBuild) {
dependsOn syncAppSource, syncTestRepository
dir = "${buildDir}/spring-boot-server-tests-app"
startParameter.buildCacheEnabled = false
tasks = [
"jettyBootJar",
"jettyBootWar",
"tomcatBootJar",
"tomcatBootWar",
"undertowBootJar",
"undertowBootWar"
]
}
intTest {
dependsOn buildApps
}