bmuschko/gradle-clover-plugin — Issue #12: cloverGenerateReport overwrites classes dir with instrumented code
Author: mambon2
Created: 2012-03-08 22:00:48+00:00
State: open

We have noticed that classes dir gets overwritten with instrumented classes but is not reverted back to non-instrumented classes after the task completes.

There is an implicit assumption that the jar task will execute before the cloverGenerateReport task, but this might not always be the case. And if the jar task executes after cloverGenerateReport task, the resulting jar will have the instrumented code.

We believe this to be a bug. cloverGenerateReport should clean up after itself by restoring the non-instrumented code after it completes. Will provide an example if one is needed, but its fairly simple to reproduce.