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.
|
|
|
|
|
*/
|
|
|
|
|
|
2024-03-29 03:12:20 +08:00
|
|
|
plugins {
|
|
|
|
|
id "java"
|
|
|
|
|
id "org.springframework.boot.integration-test"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
description = "Spring Boot SNI Integration Tests"
|
|
|
|
|
|
|
|
|
|
configurations {
|
|
|
|
|
app
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2025-07-09 06:58:43 +08:00
|
|
|
app project(path: ":platform:spring-boot-dependencies", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":module:spring-boot-restclient", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":starter:spring-boot-starter", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":starter:spring-boot-starter-actuator", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":starter:spring-boot-starter-tomcat", configuration: "mavenRepository")
|
2025-10-23 23:34:05 +08:00
|
|
|
app project(path: ":starter:spring-boot-starter-webmvc", configuration: "mavenRepository")
|
2025-07-09 06:58:43 +08:00
|
|
|
app project(path: ":starter:spring-boot-starter-webflux", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":build-plugin:spring-boot-gradle-plugin", configuration: "mavenRepository")
|
|
|
|
|
app project(path: ":module:spring-boot-webflux", configuration: "mavenRepository")
|
|
|
|
|
|
|
|
|
|
intTestImplementation(enforcedPlatform(project(":platform:spring-boot-internal-dependencies")))
|
2025-07-22 18:24:46 +08:00
|
|
|
intTestImplementation(project(":starter:spring-boot-starter-webmvc"))
|
2025-07-09 06:58:43 +08:00
|
|
|
intTestImplementation(project(":test-support:spring-boot-test-support"))
|
|
|
|
|
intTestImplementation(project(":starter:spring-boot-starter-test"))
|
2025-10-16 04:56:36 +08:00
|
|
|
intTestImplementation("org.testcontainers:testcontainers-junit-jupiter")
|
2024-03-29 03:12:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("syncMavenRepository", Sync) {
|
2024-03-29 03:12:20 +08:00
|
|
|
from configurations.app
|
2024-10-17 23:52:55 +08:00
|
|
|
into layout.buildDirectory.dir("int-test-maven-repository")
|
2024-03-29 03:12:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("syncReactiveServerAppSource", org.springframework.boot.build.SyncAppSource) {
|
2024-03-29 03:12:20 +08:00
|
|
|
sourceDirectory = file("spring-boot-sni-reactive-app")
|
2024-10-17 23:52:55 +08:00
|
|
|
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-sni-reactive-app"))
|
2024-03-29 03:12:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("buildReactiveServerApps", GradleBuild) {
|
2024-03-29 03:12:20 +08:00
|
|
|
dependsOn syncReactiveServerAppSource, syncMavenRepository
|
2024-10-17 23:52:55 +08:00
|
|
|
dir = layout.buildDirectory.dir("spring-boot-sni-reactive-app")
|
2024-03-29 03:12:20 +08:00
|
|
|
startParameter.buildCacheEnabled = false
|
|
|
|
|
tasks = [
|
|
|
|
|
"nettyServerApp",
|
2025-08-20 15:25:05 +08:00
|
|
|
"tomcatServerApp"
|
2024-03-29 03:12:20 +08:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("syncServletServerAppSource", org.springframework.boot.build.SyncAppSource) {
|
2024-03-29 03:12:20 +08:00
|
|
|
sourceDirectory = file("spring-boot-sni-servlet-app")
|
2024-10-17 23:52:55 +08:00
|
|
|
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-sni-servlet-app"))
|
2024-03-29 03:12:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("buildServletServerApps", GradleBuild) {
|
2024-03-29 03:12:20 +08:00
|
|
|
dependsOn syncServletServerAppSource, syncMavenRepository
|
2024-10-17 23:52:55 +08:00
|
|
|
dir = layout.buildDirectory.dir("spring-boot-sni-servlet-app")
|
2024-03-29 03:12:20 +08:00
|
|
|
startParameter.buildCacheEnabled = false
|
|
|
|
|
tasks = [
|
2025-08-20 15:25:05 +08:00
|
|
|
"tomcatServerApp"
|
2024-03-29 03:12:20 +08:00
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("syncClientAppSource", org.springframework.boot.build.SyncAppSource) {
|
2024-03-29 03:12:20 +08:00
|
|
|
sourceDirectory = file("spring-boot-sni-client-app")
|
2024-10-17 23:52:55 +08:00
|
|
|
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-sni-client-app"))
|
2024-03-29 03:12:20 +08:00
|
|
|
}
|
|
|
|
|
|
2025-04-05 22:46:08 +08:00
|
|
|
tasks.register("buildClientApp", GradleBuild) {
|
2024-03-29 03:12:20 +08:00
|
|
|
dependsOn syncClientAppSource, syncMavenRepository
|
2024-10-17 23:52:55 +08:00
|
|
|
dir = layout.buildDirectory.dir("spring-boot-sni-client-app")
|
2024-03-29 03:12:20 +08:00
|
|
|
startParameter.buildCacheEnabled = false
|
|
|
|
|
tasks = ["build"]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
intTest {
|
|
|
|
|
inputs.files(
|
2024-10-17 23:52:55 +08:00
|
|
|
layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-netty-reactive.jar"),
|
|
|
|
|
layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat-reactive.jar"),
|
2025-08-20 15:25:05 +08:00
|
|
|
layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat-servlet.jar")
|
2024-10-17 23:52:55 +08:00
|
|
|
)
|
2024-03-29 03:12:20 +08:00
|
|
|
.withPropertyName("applicationArchives")
|
|
|
|
|
.withPathSensitivity(PathSensitivity.RELATIVE)
|
|
|
|
|
.withNormalizer(ClasspathNormalizer)
|
|
|
|
|
dependsOn buildReactiveServerApps, buildServletServerApps, buildClientApp
|
|
|
|
|
}
|