In a multi module project, when I write testcases which use classes from other
module, somehow gradle plugin generates `jacoco.exec` in app directory.
And in `app/build/jacoco/testDebugUnitTest.exec` also exists.
I have found a temporary workaround. Just specify the system property:
testOptions {
unitTests {
all {
systemProperty 'jacoco-agent.destfile', buildDir.path +
'/jacoco/tests.exec'
}
}
}
or add a file jacoco-agent.properties file with
destfile=build/jacoco/tests.exec content in the library project under
debug/resources/ folder.
My reproducible project: https://github.com/DenysShovhenia/Test
Steps to reproduce:
- Open project in Android Studio
- Run testDebugUnitTest task of Test(root) module
- Note the newly created jacoco.exec file in the root folder of app module
Gradle version: 4.1.0
Android Plugin Version: 3.0.1
Module Compile Sdk Version: 26
Also, I have found a similar open issue here:
https://issuetracker.google.com/issues/67872367
--
You received this message because you are subscribed to the Google Groups
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jacoco/c609af19-4b4f-4807-b6ef-bc114b872b71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.