wsdl2java
wsdl2java copied to clipboard
Make deleteOutputFolders call in wsdl2java task optional
wsdl2java task is now the bottleneck on my build. So I would like to parallelize it. I've tried the following code in my build.gradle:
(configurations.wsdlAndXsdSourcesCompile.files + configurations.wsdlAndXsdSources.files).eachWithIndex { artifact, i ->
tasks.create(name: "wsdl2java$artifact", type: Wsdl2JavaTask) {
wsdlDir = file("$buildDir/schema")
wsdlsToGenerate = [wsdlsAndXjbs[i]]
}
tasks.create(name: "copyWsdlFromArtifacts$artifact", type: Copy) {
from zipTree(artifact)
into "$buildDir/schema/"
include '**/*.xsd', '**/*.wsdl'
}
tasks.findByName("wsdl2java$artifact").dependsOn(tasks.findByName("copyWsdlFromArtifacts$artifact"))
compileJava.dependsOn(tasks.findByName("wsdl2java$artifact"))
}
It fails because wsdl2java task attempts to delete output dir in this line.
Could you please make this call optional so that I could parallelize classes generation? Thank you very much!
Sorry, took a look the a wrong line
heh, seems like I was right) build fails as output dir is cleaned before every task