[PLEASE HELPME] Resources processing


(Yurii) #1

I have such hierarchy of directories in my project resources and i need to include all directories except that are named notadd. Also, I need to do that without any exclude.

a/
b/
  |-->sub
             | --> subsub1
                                 | --> add
                                 | --> notadd
             | --> subsub2
                                 | --> add
                                 | --> notadd
d/

I have tried next:

  1. Printl appears but it just didn’t do any change in resources.
processResources {
    from('b/sub'){
        println 'aaaa'
        include 'subsub1/add/**'
        include 'subsub2/add/**'
    }
}
  1. As s result, it copies only add categories(what i needed) but removes all other(a and d).
sourceSets {
    main {
        resources {
            include 'b/sub/subsub1/add/**'
            include 'b/sub/subsub2/add/**'
        }
    }
}