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

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top