Hey, Sorry, not possible at the moment :) If you look at the docs for Delete task (of 'delete' method on the Project) you'll see that the paths you pass to the method are resolved via Project.file() method. At this moment, this method does not support wildcards.
http://gradle.org/current/docs/dsl/org.gradle.api.tasks.Delete.html I guess typically, we just know what we want to delete :) At this moment, you could use antbuilder: task del << { ant.delete (includeEmptyDirs: 'true') { fileset(dir: file('.'), includes: 'foo*') } } Cheers! On Mon, Jul 4, 2011 at 7:14 PM, codechump <[email protected]> wrote: > I tried this: > > task("mydelete", type: Delete) { > delete "mydir", "*.txt" > } > > ...and: > > task("mydelete", type: Delete) { > fileset(dir: "mdir", includes: "*") > delete "*.txt" > } > > If I can get this working, then I'd like to make sure it will not cause an > error if the dir is not there (the whole dir. has already been deleted). > > thanks.. AJ > > -- > View this message in context: > http://gradle.1045684.n5.nabble.com/Delete-with-wildcard-tp4550586p4550678.html > Sent from the gradle-user mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > -- Szczepan Faber Principal engineer@gradleware Lead@mockito --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
