As Peter mentioned, you should be able to do what you want by configuring the sources to be copied, rather than configuring the task. The ‘processResources’ task doesn’t copy everything from a directory, it copies everything in ‘sourceSets.main.resources’, which by default is everything in the resources directory.
Take a look at http://www.gradle.org/docs/nightly/dsl/org.gradle.api.tasks.SourceSet.html and http://www.gradle.org/docs/nightly/javadoc/org/gradle/api/file/SourceDirectorySet.html to get an idea how you could add extra directories to the resources. Something like:
sourceSets {main {
resources {
srcDirs “some/dir”, “some/other/dir”
exclude “/foo/”
}
} }