2025-06-21 08:20:50 +08:00
|
|
|
/*
|
|
|
|
* Copyright 2012-present 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.
|
|
|
|
*/
|
|
|
|
|
2021-07-09 05:23:43 +08:00
|
|
|
plugins {
|
|
|
|
id 'java-gradle-plugin'
|
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("syncMavenRepository", Sync) {
|
2021-11-26 20:00:30 +08:00
|
|
|
from configurations.app
|
2024-10-17 23:41:00 +08:00
|
|
|
into layout.buildDirectory.dir("system-test-maven-repository")
|
2021-11-26 20:00:30 +08:00
|
|
|
}
|
|
|
|
|
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-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")
|
|
|
|
}
|
2025-02-11 19:34:43 +08:00
|
|
|
|
|
|
|
toolchain {
|
|
|
|
maximumCompatibleJavaVersion = JavaLanguageVersion.of(23)
|
|
|
|
}
|