KasperF
KasperF

Reputation: 342

gradle: Exclude all - except one file

In a gradle build I would like to exclude all files except one. I tried to do it like this:

processResources {

    // exclude everything
    exclude '*.*'

    // except this file
    include 'fileA.xml'
}

..but it does not seem to work - all files are excluded. Is this possible in some way?

Thanks for your help and input.

Upvotes: 3

Views: 5520

Answers (1)

Alexiy
Alexiy

Reputation: 2030

Remove the 'exclude' part, because when you use 'include', you don't have to use 'exclude' patterns - gradle automatically excludes all others.

Upvotes: 11

Related Questions