2021-07-09 05:23:43 +08:00
|
|
|
plugins {
|
|
|
|
id 'java-gradle-plugin'
|
|
|
|
id "org.springframework.boot.conventions"
|
|
|
|
id "org.springframework.boot.system-test"
|
|
|
|
}
|
|
|
|
|
|
|
|
description = "Spring Boot Image Building Tests"
|
|
|
|
|
|
|
|
configurations {
|
2021-11-26 20:00:30 +08:00
|
|
|
app
|
2021-07-09 05:23:43 +08:00
|
|
|
providedRuntime {
|
|
|
|
extendsFrom dependencyManagement
|
|
|
|
}
|
2023-05-04 22:39:57 +08:00
|
|
|
all {
|
|
|
|
resolutionStrategy {
|
|
|
|
eachDependency { dependency ->
|
|
|
|
// Downgrade Jackson as Gradle cannot cope with 2.15.0's multi-version
|
|
|
|
// jar files with bytecode in META-INF/versions/19
|
|
|
|
if (dependency.requested.group.startsWith("com.fasterxml.jackson")) {
|
|
|
|
dependency.useVersion("2.14.2")
|
|
|
|
}
|
2023-06-19 16:57:27 +08:00
|
|
|
// Downgrade Spring Framework as Gradle cannot cope with 6.1.0-M1's
|
|
|
|
// multi-version jar files with bytecode in META-INF/versions/21
|
|
|
|
if (dependency.requested.group.equals("org.springframework")) {
|
2024-05-28 23:52:00 +08:00
|
|
|
dependency.useVersion("$springFramework60xVersion")
|
2023-06-19 16:57:27 +08:00
|
|
|
}
|
2023-05-04 22:39:57 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2021-07-09 05:23:43 +08:00
|
|
|
}
|
|
|
|
|
2021-11-26 20:00:30 +08:00
|
|
|
task syncMavenRepository(type: Sync) {
|
|
|
|
from configurations.app
|
|
|
|
into "${buildDir}/system-test-maven-repository"
|
|
|
|
}
|
|
|
|
|
2021-07-09 05:23:43 +08:00
|
|
|
systemTest {
|
2021-11-26 20:00:30 +08:00
|
|
|
dependsOn syncMavenRepository
|
2021-07-09 05:23:43 +08:00
|
|
|
if (project.hasProperty("springBootVersion")) {
|
|
|
|
systemProperty "springBootVersion", project.properties["springBootVersion"]
|
|
|
|
} else {
|
|
|
|
systemProperty "springBootVersion", project.getVersion()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2021-11-26 20:00:30 +08:00
|
|
|
app project(path: ":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin", configuration: "mavenRepository")
|
|
|
|
app project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter-web", configuration: "mavenRepository")
|
|
|
|
|
2021-07-09 05:23:43 +08:00
|
|
|
implementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-web")) {
|
|
|
|
exclude group: "org.hibernate.validator"
|
|
|
|
}
|
|
|
|
|
|
|
|
systemTestImplementation(project(":spring-boot-project:spring-boot-starters:spring-boot-starter-test"))
|
2021-11-26 20:00:30 +08:00
|
|
|
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin"))
|
2021-07-16 00:37:43 +08:00
|
|
|
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-gradle-test-support"))
|
2021-07-09 05:23:43 +08:00
|
|
|
systemTestImplementation(project(":spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"))
|
|
|
|
systemTestImplementation(gradleTestKit())
|
|
|
|
systemTestImplementation("org.assertj:assertj-core")
|
|
|
|
systemTestImplementation("org.testcontainers:junit-jupiter")
|
|
|
|
systemTestImplementation("org.testcontainers:testcontainers")
|
|
|
|
}
|