-
Notifications
You must be signed in to change notification settings - Fork 41.1k
/
Copy pathbuild.gradle
71 lines (62 loc) · 3.32 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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"))
}
task syncTestRepository(type: Sync) {
destinationDir = file(layout.buildDirectory.dir("test-repository"))
from {
configurations.testRepository
}
}
task syncAppSource(type: org.springframework.boot.build.SyncAppSource) {
sourceDirectory = file("spring-boot-server-tests-app")
destinationDirectory = file(layout.buildDirectory.dir("spring-boot-server-tests-app"))
}
task buildApps(type: 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
}