scoverage / gradle-scoverage

A plugin to enable the use of Scoverage in a gradle Scala project
Apache License 2.0
53 stars 38 forks source link

Add package like task #199

Open igreenfield opened 1 year ago

igreenfield commented 1 year ago

In the Maven plugin you can create jar with all instrumented classes so you can test on other systems also you can get cross-module coverage. Can you add such an ability?

maiflai commented 1 year ago

Sadly it's not as straightforward as you might hope - I think Gradle keeps a close eye on task inputs and outputs.

It used to be possible to create a Jar from scoverageClasses and add this to the scoverage dependencies in the dependent project.

This then ensures the instrumented classes are placed first in the classpath.

However I think Gradle 8 doesn't like this.

I'm also not sure how portable the instrumented classes are; they used to have the output path embedded.