Open haobin opened 5 years ago
The generated classes for databind are in different paths than what is expected by the plugin. Following is the paths based on the android databind codelab project.
./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/SolutionBindingImpl.class ./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/PlainActivitySolution5BindingImpl.class ./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/PlainActivitySolution4BindingImpl.class
Jacoco Android gradle plugin excludes "*/android/databinding/.class", so it doesn't really exclude the generated classes above.
I think this should be as simple as adding '**/*databinding/**/*.*' to the fileFilter...
'**/*databinding/**/*.*'
Wait. They should be as of https://github.com/arturdm/jacoco-android-gradle-plugin/blob/master/src/main/groovy/com/dicedmelon/gradle/jacoco/android/JacocoAndroidUnitTestReportExtension.groovy
The generated classes for databind are in different paths than what is expected by the plugin. Following is the paths based on the android databind codelab project.
./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/SolutionBindingImpl.class ./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/PlainActivitySolution5BindingImpl.class ./app/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/com/example/android/databinding/basicsample/databinding/PlainActivitySolution4BindingImpl.class
Jacoco Android gradle plugin excludes "*/android/databinding/.class", so it doesn't really exclude the generated classes above.