I build my project with Gradle 1.0 and I use the EMMA plugin for code coverage info. I would like to exclude certain files from the coverage report.
How can I achieve that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you including this Gradle script? I think you can exclude classes within your instrumentation definition (see example below). However, it doesn’t look like you can set the exclude pattern by using a convention property.
If I were you I’d try to fork the plugin, add a new field to
EmmaPluginConventionthat lets you set the exclude pattern and then use that variable in theinstrpathdefinition. After changing the code and verifying that it works send a pull request to the author. I am sure he will incorporate your change.