gradle: Exclude all - except one file

让人想犯罪 __ 提交于 2020-01-15 03:59:05

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/39916840/gradle-exclude-all-except-one-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!