Jacoco and Unit Tests Code Coverage with android-gradle-plugin >= 1.1

后端 未结 9 857

I recently started integrating android-gradle-plugin 1.1.0 in one of my projects. The project uses robolectric 2.4 to run unit tests.

It\'s

9条回答
  •  情歌与酒
    2020-12-12 21:23

    Please create an example and I can take a look. I guess it's some missing path configuration.

    • include all coverage files (*.exec)
    • add all your source paths (module/src/main/java)
    • add all class paths (module/build/intermediates/classes/debug)

    here two examples how it could be look

    • https://github.com/nenick/AndroidAppDevelopment/blob/master/Scripts/jacoco-support-app-module.gradle
    • https://github.com/nenick/AndroidAppDevelopment/blob/master/Scripts/jacoco-coveralls-support.gradle

提交回复
热议问题