Unable to Exclude packages out of code coverage in android and jacoco


Am Unable to exclude some packages out of code coverage through build.gradle in android.
Tried to exclude the files in below way, but did’t worked out.

test {
exclude ‘/UI/
With the above code snippet, all my test 77 test cases are vanished, none of them considered and shown as 0% code coverage.

Also tried, exclude ‘**/RegistartionActivityTest.java’, but it still shows the coverage of this particular file.

Please help me in this regard,as i’ve stuck up.

Thanks and Regards,
Satya Prasad.

@puvsprasad hi did you solve this issue?