Creating zip of android project along with its dep

2019-07-31 18:25发布

I have an android project which have three different dependencies (library projects) and I want to create a zip of each project src folder after we are finished with the builds. I did the following,

task srcZip(type: Zip) {
    from projectDir
    println "SOURCE THE ZIP"
    exclude 'build'
    exclude 'gen'
    exclude 'bin'
}

In order to make a zip however I have to call this task manually. This works only if I have to create a zip file of one project which does not include the sources of other dependencies (library projects). How can I create a zip of all the sources at once?

Thanks in advance.

1条回答
甜甜的少女心
2楼-- · 2019-07-31 18:29

So I was able to fix the problem on my own,

Copying the following to all the dependent projects,

task srcZip(type: Zip) {
    from projectDir
    println "SOURCE THE ZIP"
    exclude 'build'
    exclude 'gen'
    exclude 'bin'
}
查看更多
登录 后发表回答