I have a gradle task that calls ant.exec() to do svn export into a directory:
/*
* Get code from repository into the 'src' directory
*/
task getSource << {
ant.exec(executable: svn_executable) {
arg(value: 'export')
arg(value: repository)
arg(value: 'src')
}
}
Then I have a task that deletes certain files in the exported directory:
task deletes(type: Delete) {
ant.delete() {
fileset(dir: "src", includes: "**/*template*")
}
}
And then I have another task that calls getSource and deletes one after another.
The problem is that gradle doesn't wait for the getSource to complete and goes straight ahead to the next task, which is a problem, since at that moment there are no files that need to be deleted.
Is there a way to get around this?
Thank you!