4

I have a multi-module Android gradle project.

project
  |- app
  |- module1
  |- module2

Each of the modules contains unit tests, the app module also contains Instrumented Tests. Instead of taking the xml reports from the modules I would like to store them in one place, e.g. /build/tests/reports.

What I tried so far to achieve this is to set the report dir to this path

android {
    testOptions {
        resultsDir "$rootDir/build/test/results"
        reportDir "$rootDir/build/test/reports"
    }
}

I applied this in all the module's gradle files. But it seems as if this only works for the instrumented / connected test reports. How can I also achieve this for unit tests?

luckyhandler
  • 10,651
  • 3
  • 47
  • 64

0 Answers0