Fix Gradle warnings about task output

As of Gradle 4.0, project SourceSets can have multiple output
directories (one per programming language).
This commit fixes warnings that are logged when a single output dir
is considered by tasks.

Issue: SPR-15885
This commit is contained in:
Brian Clozel
2017-08-21 14:42:12 +02:00
parent cc3d7d2d48
commit 5460c0095b
3 changed files with 24 additions and 25 deletions

View File

@@ -95,28 +95,6 @@ task genJaxb {
}
}
// JiBX compiler is currently not compatible with JDK 9
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
compileTestJava {
def bindingXml = "${projectDir}/src/test/resources/org/springframework/oxm/jibx/binding.xml"
doLast() {
project.ant {
taskdef(name: "jibx",
classname: "org.jibx.binding.ant.CompileTask",
classpath: configurations.jibx.asPath)
jibx(verbose: true, load: true, binding: bindingXml) {
classpathset(dir: sourceSets.test.output.classesDir) {
include(name: "**/jibx/**/*")
}
}
}
}
}
}
dependencies {
compile(project(":spring-beans"))
compile(project(":spring-core"))
@@ -142,4 +120,25 @@ dependencies {
testRuntime("xerces:xercesImpl:2.11.0") // for Castor
testRuntime("com.sun.xml.bind:jaxb-core:${jaxbVersion}")
testRuntime("com.sun.xml.bind:jaxb-impl:${jaxbVersion}")
}
// JiBX compiler is currently not compatible with JDK 9
if (JavaVersion.current() == JavaVersion.VERSION_1_8) {
compileTestJava {
def bindingXml = "${projectDir}/src/test/resources/org/springframework/oxm/jibx/binding.xml"
doLast() {
project.ant {
taskdef(name: "jibx",
classname: "org.jibx.binding.ant.CompileTask",
classpath: configurations.jibx.asPath)
jibx(verbose: true, load: true, binding: bindingXml) {
classpathset(dir: sourceSets.test.java.outputDir) {
include(name: "**/jibx/**/*")
}
}
}
}
}
}