Files
spring-boot/spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-ant/build.gradle
Andy Wilkinson 714a187d8f Rework dep mgmt again to avoid consumers picking up strict constraints
This paves the way for publishing Gradle module metadata once the
problem caused by snapshot versions and our two-step publication
process has been addressed.

See gh-19609
2020-01-15 12:33:18 +00:00

70 lines
1.8 KiB
Groovy

plugins {
id 'org.springframework.boot.conventions'
id 'java-base'
}
description = 'Spring Boot Ant smoke test'
configurations {
antDependencies
testRepository
}
sourceSets {
test
}
plugins.withType(EclipsePlugin) {
eclipse {
classpath {
plusConfigurations = [configurations.testRuntimeClasspath]
}
}
}
dependencies {
antDependencies 'org.apache.ivy:ivy:2.4.0'
antDependencies project(path: ':spring-boot-project:spring-boot-tools:spring-boot-antlib')
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 platform(project(':spring-boot-project:spring-boot-dependencies'))
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.')
}
}
ant.importBuild('build.xml') {
'ant' + it
}
ant.properties['ant-spring-boot.version'] = project.version
ant.properties['projectDir'] = project.layout.projectDirectory
antresolve {
dependsOn syncTestRepository, configurations.antDependencies
doFirst {
ClassLoader antClassLoader = org.apache.tools.ant.Project.class.classLoader
configurations.antDependencies.each { antClassLoader.addURL it.toURI().toURL() }
}
}
task test(type: Test) {
dependsOn antbuild
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
}
check {
dependsOn test
}