Replacing default processResources task

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 and 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/


} }