-
Notifications
You must be signed in to change notification settings - Fork 40.2k
/
build.gradle
68 lines (57 loc) · 1.76 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
plugins {
id "org.springframework.boot.conventions"
id "java-base"
}
description = "Spring Boot Ant smoke test"
configurations {
antDependencies {
extendsFrom dependencyManagement
}
testRepository
}
sourceSets {
test
}
plugins.withType(EclipsePlugin) {
eclipse {
classpath {
plusConfigurations = [configurations.testRuntimeClasspath]
}
}
}
dependencies {
antDependencies "org.apache.ivy:ivy:2.5.0"
antDependencies project(path: ":spring-boot-project:spring-boot-tools:spring-boot-antlib")
antDependencies "org.apache.ant:ant-launcher:1.10.7"
antDependencies "org.apache.ant:ant:1.10.7"
testRepository(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-loader", configuration: "mavenRepository"))
testRepository(project(path: ":spring-boot-project:spring-boot-starters:spring-boot-starter", configuration: "mavenRepository"))
testImplementation(project(path: ":spring-boot-project:spring-boot-tools:spring-boot-loader-tools"))
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.springframework:spring-core")
}
task syncTestRepository(type: Sync) {
destinationDir = file("${buildDir}/test-repository")
from configurations.testRepository
rename {
it.replaceAll("-[0-9]+\\.[0-9]+-[0-9]+\\.", "-SNAPSHOT.")
}
}
task antRun(type: JavaExec) {
dependsOn syncTestRepository, configurations.antDependencies
classpath = configurations.antDependencies;
main = "org.apache.tools.ant.launch.Launcher"
systemProperties = [
"ant-spring-boot.version" : version,
"projectDir": project.layout.projectDirectory
]
}
task test(type: Test) {
dependsOn antRun
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
}
check {
dependsOn test
}