Exclude in 'resources' not excluding a folder

Have a dir structure as following :- conf

  • user

  • test I want to exclude test folder in the output jar. Am trying the following configuration. It still leaves an empty test folder.

How can this be removed.

resources {

srcDir ‘conf’

exclude ‘test/*’

exclude ‘test’

exclude ‘*.properties’

}

Do you mean ‘sourceSets.main.resources { … }’? Please always format code snippets as HTML code blocks.

Yes.

Try:

processResources {
    includeEmptyDirs = false
}

Thanks a lot. Cheers!!