I have a project structure that looks like the below. I want to use the TestReport functionality in Gradle to aggregate all the test results to a single directory. Then I ca
FYI, I've solved this problem using the following subprojects config in my root project build.gradle file. This way no extra tasks are needed.
Note: this places each module's output in its own reports/ folder, so subproject builds don't overwrite each other's results.
subprojects {
// Combine all build results
java {
reporting.baseDir = "${rootProject.buildDir.path}/reports/${project.name}"
}
}
For a default Gradle project, this would result in a folder structure like
build/reports/module_a/tests/test/index.html
build/reports/module_b/tests/test/index.html
build/reports/module_c/tests/test/index.html