|
|
|
plugins {
|
|
|
|
id "java"
|
|
|
|
id "org.springframework.boot.conventions"
|
|
|
|
id "org.springframework.boot.integration-test"
|
|
|
|
}
|
|
|
|
|
|
|
|
description = "Spring Boot Server Integration Tests"
|
|
|
|
|
|
|
|
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") {
|
|
|
|
exclude group: "commons-logging", module: "commons-logging"
|
|
|
|
}
|
|
|
|
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 {
|
|
|
|
inputs.files(
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-jetty.jar",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-jetty.war",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-resources.jar",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat.jar",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat.war",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-undertow.jar",
|
|
|
|
"${buildDir}/spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-undertow.war")
|
|
|
|
.withPropertyName("applicationArchives")
|
|
|
|
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
|
|
.withNormalizer(ClasspathNormalizer)
|
|
|
|
dependsOn buildApps
|
|
|
|
}
|