cleanthe project before generating the coverageReport? It seems to me that, changing only one line, and then re-generating the report gets me wrong results (everything to 0.0% in my case). Then I just do
coverageReportand it shows "normal" numbers again
coverage; test; it:test; coverageOff; coverageReport
[info] Cleaning datadir [/my-project/target/scala-2.12/scoverage-data] [info] Beginning coverage instrumentation [info] Instrumentation completed [456 statements] [info] Wrote instrumentation file [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage] [info] Will write measurement data to [/my-project/target/scala-2.12/scoverage-data]
[info] Cleaning datadir [/my-project/target/scala-2.12/scoverage-data] [info] Beginning coverage instrumentation [info] Instrumentation completed [18 statements] [info] Wrote instrumentation file [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage] [info] Will write measurement data to [/my-project/target/scala-2.12/scoverage-data]
[info] Reading scoverage instrumentation [/my-project/target/scala-2.12/scoverage-data/scoverage.coverage]
scoverage.report.ScoverageHtmlWriter#writemyself I guess
coverageDataDirsetting or something like that? Can you set it explicitly for the
groupBysomething more permanent than their
id, and somehow merge them
ignored, and if things like
startaren't the same throw an error or take any, or include that in the grouping key)
coverageEnabled := trueproduce the exact compiled artifacts as
coverageEnabled := false?
I'm setting up a scoverage into a multi-module gradle project. It included it before, but it was disabled while the project was updated to scala 2.13.8 (from Scala 2.12).
Now I'm using the gradle-scoverage plugin 6.1.0, with the scoverageVersion set to 1.4.11. This is supposed to support Scala 2.13.8, but I keep getting this error while
runnign reportScoverage task:
at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124) at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64) at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48) at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56) Caused by: java.lang.NoSuchMethodError: scala.Predef$.refArrayOps([Ljava/lang/Object;)Ljava/lang/Object; at scoverage.report.CoverageAggregator$.aggregate(CoverageAggregator.scala:18) at scoverage.report.CoverageAggregator.aggregate(CoverageAggregator.scala) at org.scoverage.ScoverageReport$_report_closure1.doCall(ScoverageReport.groovy:51) at org.scoverage.ScoverageReport$_report_closure1.doCall(ScoverageReport.
From what I can gather, this error usually relates to old scala version creating a conflict with the new one. I don't know which part here could cause this mismatch, any ideas?