[GRADLE-1857] source(someDir) is not adding the directory to the set of sources, instead is clobbering it Created: 20/Oct/11 Updated: 04/Jan/13 Resolved: 23/Feb/12 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | 1.0-milestone-3 |
Fix Version/s: | 1.0-milestone-9 |
Type: | Bug | ||
Reporter: | David Kowis | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Description |
Using the java and groovy plugin in combination with generating sources using the wsimport ant task: doLast { ant.taskdef(name:'wsimport', classname:'com.sun.tools.ws.ant.WsImport', classpath:configurations.jaxws.asPath) ant.wsimport( keep:true, target: "2.1", sourceDestDir: "$generatedDir", package: "com.imasample.somesoapservice", wsdl: "$projectDir/src/main/wsdl/tehWSDL.wsdl" ) }} compileJava { dependsOn wsimport source wsimport.generatedDir }compileTestJava { dependsOn wsimport source wsimport.generatedDir } compileTestGroovy { dependsOn wsimport source wsimport.generatedDir }</paste> Instead of the source directory being appended to the source for the given compile task, it is clobbering it, such that only the sources for the wsimport generated sources are being compiled. Workaround: use += and create a FileTree object out of the directory name. compileTestJava { dependsOn wsimport source += fileTree(dir: wsimport.generatedDir) }compileTestGroovy { dependsOn wsimport source += fileTree(dir: wsimport.generatedDir) }</paste> |