How to exclude Dagger2 classes from test coverage

前端 未结 2 1169
感情败类
感情败类 2021-02-18 15:43

Is there any option to exclude Dagger2 classes from test coverage report in Android Studio

2条回答
  •  感动是毒
    2021-02-18 16:11

    More recent versions of Dagger generate additional files with slightly different patterns. I had success with the following excludes when using Dagger 2.15

    '**/*_MembersInjector.class',
    '**/Dagger*Component*.class',
    '**/Dagger*Subcomponent*.class',
    '**/*Subcomponent$Builder.class',
    '**/*Module_*Factory.class',
    

提交回复
热议问题