Gradle 1.2: Exclude directory under resources sourceSets

前端 未结 3 850
一个人的身影
一个人的身影 2020-12-01 21:23

I have development related directory src/main/resources/certs/test which is needed for one external library. This has some cert files which are not needed in pr

3条回答
  •  醉话见心
    2020-12-01 22:09

    I had a similar problem with production files in a JAR file (though mine were not test files). I solved it with the following:

    jar {
        exclude ("DIRECTORY-TO-EXCLUDE/**")
    }
    

    e.g.

    jar {
        exclude ("test/**")
    }
    

提交回复
热议问题