Aurimas Liutikas | c6afe34 | 2019-11-26 22:33:50 -0800 | [diff] [blame] | 1 | def destDir = (System.getenv("DIST_DIR") == null) ? file("dist") : file(System.getenv("DIST_DIR")) |
| 2 | |
| 3 | def hostTestDir = new File(destDir, "host-test-reports") |
| 4 | |
| 5 | allprojects { 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 Liutikas | bd8813c | 2019-11-27 13:55:21 -0800 | [diff] [blame] | 27 | zipMaven.dependsOn(":runners:fatjar:publishToDistMaven") |
Aurimas Liutikas | c6afe34 | 2019-11-26 22:33:50 -0800 | [diff] [blame] | 28 | } |
| 29 | } |