Gradle : Copy all test dependencies to a zip file

给你一囗甜甜゛ 提交于 2019-12-05 06:13:45

This works for me: http://forums.gradle.org/gradle/topics/how_do_i_make_a_zip_to_contain_dependency_artifacts

Sample task:

task zip2(dependsOn: 'testCompile', type: Zip) {
    from configurations.testCompile.allArtifacts.files
    from configurations.testCompile
    archiveName project.name + "_test_"+ project.version
}

Then run:

gradle test zip2

Zip file will be generated at:

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