On 4 August 2011 15:27, phil swenson <[email protected]> wrote: > > I gave up on trying to setup a source set filter to do what I need > (can't find any examples) so now I'm trying to just directly convert > ant: >
The documentation is there, but can be hard to find at times. From the DSL reference you get an example of a java sourceSet with a basic exclude. http://gradle.org/current/docs/dsl/org.gradle.api.tasks.SourceSet.html sourceSets { main { java { exclude 'some/unwanted/package/**' } } } But java in this case is a SourceDirectorySet, and if you follow the link to API docs you'll see that it is of type PatternFilterable, as well as being a FileTree. The PatternFilterable docs give some examples of include/exclude patterns. You may also find the UserGuide section on FileTree useful. http://gradle.org/current/docs/javadoc/org/gradle/api/file/SourceDirectorySet.html http://gradle.org/current/docs/javadoc/org/gradle/api/tasks/util/PatternFilterable.html http://gradle.org/current/docs/userguide/working_with_files.html#sec:file_trees If you decide you want to copy, the DSL docs contain some useful examples: http://gradle.org/current/docs/dsl/org.gradle.api.tasks.Copy.html Hope this helps -- Darrell (Daz) DeBoer Principal Engineer, Gradleware http://www.gradleware.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
