Jacoco offline instrumentation Gradle script

前端 未结 4 864
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-06 06:18

I tried looking for Jacoco offline instrumentation gradle script snippets but couldn\'t find one. Is it possible to do Jacoco offline instrumentation through gradle scripts

4条回答
  •  温柔的废话
    2020-12-06 06:29

    The answer https://stackoverflow.com/a/42238982/2689114 works for me(with some adapting to a newer gradle version).

    If you have multi-module gradle project, then you should add some extra configuration to support cross-module code coverage.

    For more details see Cross-module code coverage with Jacoco offline instrumentation in gradle mutlimodule project

    Also, there is a working example: https://github.com/SurpSG/jacoco-offline-instrumentation

提交回复
热议问题