diff --git a/gradle/sniffer.gradle b/gradle/sniffer.gradle index eb1a3451a1..874f533893 100644 --- a/gradle/sniffer.gradle +++ b/gradle/sniffer.gradle @@ -44,7 +44,7 @@ task sniff { dependsOn compileJava dependsOn copyJavaApiSignature - inputs.dir sourceSets.main.output.classesDir + sourceSets.main.output.classesDirs.each { inputs.dir it } inputs.dir copyJavaApiSignature.to doLast { diff --git a/spring-aspects/spring-aspects.gradle b/spring-aspects/spring-aspects.gradle index 99702ee1d6..d87174840e 100644 --- a/spring-aspects/spring-aspects.gradle +++ b/spring-aspects/spring-aspects.gradle @@ -18,7 +18,7 @@ compileJava { actions = [] dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileJava") - def outputDir = project.sourceSets.main.output.classesDir + def outputDir = project.sourceSets.main.java.outputDir inputs.files(project.sourceSets.main.allSource + project.sourceSets.main.compileClasspath) outputs.dir outputDir @@ -54,7 +54,7 @@ compileTestJava { dependsOn configurations.ajc.getTaskDependencyFromProjectDependency(true, "compileTestJava") dependsOn jar - def outputDir = project.sourceSets.test.output.classesDir + def outputDir = project.sourceSets.test.java.outputDir inputs.files(project.sourceSets.test.allSource + project.sourceSets.test.compileClasspath) outputs.dir outputDir diff --git a/spring-oxm/spring-oxm.gradle b/spring-oxm/spring-oxm.gradle index a3fc177b14..93b33c8ab8 100644 --- a/spring-oxm/spring-oxm.gradle +++ b/spring-oxm/spring-oxm.gradle @@ -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/**/*") + } + } + } + } + } } \ No newline at end of file