88 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Groovy
		
	
	
	
			
		
		
	
	
			88 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Groovy
		
	
	
	
/*
 | 
						|
 * 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.
 | 
						|
 */
 | 
						|
 | 
						|
plugins {
 | 
						|
	id "java"
 | 
						|
	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.client5:httpclient5")
 | 
						|
	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"))
 | 
						|
}
 | 
						|
 | 
						|
tasks.register("syncTestRepository", Sync) {
 | 
						|
	destinationDir = file(layout.buildDirectory.dir("test-repository"))
 | 
						|
	from {
 | 
						|
		configurations.testRepository
 | 
						|
	}
 | 
						|
}
 | 
						|
 | 
						|
tasks.register("syncAppSource", org.springframework.boot.build.SyncAppSource) {
 | 
						|
	sourceDirectory = file("spring-boot-server-tests-app")
 | 
						|
	destinationDirectory = file(layout.buildDirectory.dir("spring-boot-server-tests-app"))
 | 
						|
}
 | 
						|
 | 
						|
tasks.register("buildApps", GradleBuild) {
 | 
						|
	dependsOn syncAppSource, syncTestRepository
 | 
						|
	dir = layout.buildDirectory.dir("spring-boot-server-tests-app")
 | 
						|
	startParameter.buildCacheEnabled = false
 | 
						|
	tasks = [
 | 
						|
		"jettyBootJar",
 | 
						|
		"jettyBootWar",
 | 
						|
		"tomcatBootJar",
 | 
						|
		"tomcatBootWar",
 | 
						|
		"undertowBootJar",
 | 
						|
		"undertowBootWar"
 | 
						|
	]
 | 
						|
}
 | 
						|
 | 
						|
intTest {
 | 
						|
	inputs.files(
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-jetty.jar"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-jetty.war"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-resources.jar"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat.jar"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-tomcat.war"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-undertow.jar"),
 | 
						|
			layout.buildDirectory.file("spring-boot-server-tests-app/build/libs/spring-boot-server-tests-app-undertow.war")
 | 
						|
	)
 | 
						|
		.withPropertyName("applicationArchives")
 | 
						|
		.withPathSensitivity(PathSensitivity.RELATIVE)
 | 
						|
		.withNormalizer(ClasspathNormalizer)
 | 
						|
	dependsOn buildApps
 | 
						|
}
 |