How to exclude files from distZip using Gradle?

前端 未结 3 939
醉话见心
醉话见心 2021-01-01 19:32

I am using Gradle 1.3 and have it working for a small project. It creates the .JAR files exactly as I want them to. However, when I have it create a ZIP file using distZip

3条回答
  •  独厮守ぢ
    2021-01-01 20:26

    Try this by adding below lines in build.gradle file:

    distributions {
        main {
            baseName = 'ClassName'
            contents {
                exclude("**/*.jar")
            }
        }
    }
    

提交回复
热议问题