Question

Is there a way to to have a gradle build that will generate code coverage from robolectric test that can be sent to sonar?

Was it helpful?

Solution

As far as I can tell: At this time, No.

In order to have code coverage you need Emma support and that's not yet fixed in the android gradle build plugin. It's supposed to come in version 0.8.+ but it was also "supposed" to come in version 0.6+ so don't hold your breath.

Roadmap: http://tools.android.com/tech-docs/new-build-system/roadmap

Related Emma Issue: https://code.google.com/p/android/issues/detail?id=60964

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top