Hi,
I’m having trouble with what should be a simple operation. I’m trying to delete *.css files under a directory. The directory has subdirectories with *.css files in them. I would like to recursively delete all *.css files under the directory. My code looks like this:
clean {
doLast {
delete fileTree(dir: 'app/styles' , include: '**/*.css')
}
}
The code runs, but it only deletes *.css files immediately under ‘app/styles’. I tried many different combinations of constructing FileTree objects and specifying file matching patterns. None worked so far.
What am I doing wrong?
Here’s my gradle environment:
$ gradle --version
------------------------------------------------------------
Gradle 1.11
------------------------------------------------------------
Build time:
2014-02-11 11:34:39 UTC
Build number: none
Revision:
a831fa866d46cbee94e61a09af15f9dd95987421
Groovy:
1.8.6
Ant:
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
Ivy:
2.2.0
JVM:
1.7.0_51 (Oracle Corporation 24.51-b03)
OS:
Mac OS X 10.10 x86_64
Thank you.