Re: [java code coverage] Jacoco API to filter report

2018-11-26 Thread ramaro
Hey Marc, yeah i'm aware of this. Actually the major point what i intended to was to filter some Kotlin generated code. I later discovered that version 0.8.2 does this by default, but i was struggling to configure it on my Android build. After some Googling i've found out that i need to set

Re: [java code coverage] Jacoco API to filter report

2018-11-26 Thread Marc Hoffmann
Hi Rodrigo, you do know that the gradle plugin already supports filtering on class level? With the includes and excludes property you can specify patters for the classfiles to include or exclude. Regards, -marc On 2018-11-26 13:18, ram...@uolinc.com wrote: > Hey Marc, thanks for your

Re: [java code coverage] Jacoco API to filter report

2018-11-26 Thread John A
Rodrigo, Would you be willing to share your code? I'm looking for something similar and your code would be an easy and quick starting point. John On Mon, Nov 26, 2018, 04:18 Hey Marc, thanks for your reply. > > I was able to achieve what i intended to by build a custom CoverageBuilder > class

Re: [java code coverage] Jacoco API to filter report

2018-11-26 Thread ramaro
Hey Marc, thanks for your reply. I was able to achieve what i intended to by build a custom CoverageBuilder class and overriding the visitCoverage method. Building a report with the same code i've submitted (but using this custom class) generates a Report without the classes filtered by the

Re: [java code coverage] Jacoco API to filter report

2018-11-26 Thread Marc Hoffmann
Hi Rodrigo, the scope of the coverage report is defined by the classes you provide to the analyzer, not by the content of the exec file. If you filter classes from the exec file these classes simply show as not covered. Instead of calling analyzer.analzeAll() on the root folder of your

[java code coverage] Jacoco API to filter report

2018-11-23 Thread Rodrigo Amaro
Hi everyone. I know that Jacoco offers some options in order to filter which classes should be considered in the coverage report, but i sometimes fell that they are not enough (as many people that i've talked to) So i was wondering if it's possible to use Jacoco API to open the .ec/.exec