|
|
|
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;
|
|
|
|
mainClass = "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
|
|
|
|
}
|