blob: b6fb936e9175b2b7a164584e60b6c9a44624c668 [file] [log] [blame]
Aurimas Liutikasc6afe342019-11-26 22:33:50 -08001def destDir = (System.getenv("DIST_DIR") == null) ? file("dist") : file(System.getenv("DIST_DIR"))
2
3def hostTestDir = new File(destDir, "host-test-reports")
4
5allprojects { project ->
6 project.tasks.withType(Test) { task ->
7 def report = task.reports.junitXml
8 if (report.isEnabled()) {
9 def zipTask = project.tasks.create("zipResultsOf${project.name}", Zip) {
10 destinationDir = hostTestDir
11 archiveName = "${project.name}.zip"
12 }
13 task.finalizedBy(zipTask)
14 task.doFirst {
15 zipTask.from(report.destination)
16 }
17 }
18 }
19 if (project.rootProject == project) {
20 def zipMaven = project.tasks.create("zipMaven", Zip) {
21 from file("${project.buildDir}/dist-maven")
22 destinationDir destDir
23 archiveName = "maven.zip"
24 }
25 zipMaven.dependsOn(":runners:android-gradle-plugin:publishToDistMaven")
26 zipMaven.dependsOn(":runners:gradle-plugin:publishToDistMaven")
Aurimas Liutikasbd8813c2019-11-27 13:55:21 -080027 zipMaven.dependsOn(":runners:fatjar:publishToDistMaven")
Aurimas Liutikasc6afe342019-11-26 22:33:50 -080028 }
29}