gradle-print-coverage-plugin icon indicating copy to clipboard operation
gradle-print-coverage-plugin copied to clipboard

printCoverage task should not fail the gradle build if the project does not yet contain any tests

Open amimas opened this issue 6 years ago • 1 comments

This is an extension of issue #1 for supporting multi module gradle project

I tried to apply this plugin in my multi module gradle project from the root project's build.gradle. I added the plugin using either allprojects or subprojects block. All subprojects already have jacoco plugin applied with necessary configurations. But, some of them do not yet have any tests. So, there's no test report for those projects. As a result the build is marked as failed with this plugin.

It'd be nice if this plugin doesn't actually fail the build just like jacoco plugin doesn't fail the build if the project does not contain any tests. Instead the printCoverage task may print "n/a" or something like that for a project that does not have any tests.

amimas avatar Jul 05 '18 17:07 amimas

I think a task outcome of NO-SOURCE or SKIPPED might be a good solution. (Also see my comment here.)

manuelprinz avatar Aug 13 '22 11:08 manuelprinz