Hi,

the problem is exactly what the error message says: JaCoCo need the *original* 
class files. Probably you have some other task that replaced them with 
offline-instrumentation (we do not recommend using so, the JaCoCo agent is the 
preferred way as no class files are modified on disk).

Please understand that the Gradle integration of JaCoCo is done by the Gradle 
project. So maybe you look at their documentation how to setup their tasks 
correctly.

Regards,
-marc

> On 8. Jan 2021, at 18:40, 'James Cross' via JaCoCo and EclEmma Users 
> <[email protected]> wrote:
> 
> Hi,
> 
> When running jacoco on a multi-module Gradle build I'm getting many failures 
> of the form: Caused by: java.lang.IllegalStateException: Cannot process 
> instrumented class worker/org/gradle/api/JavaVersion. Please supply original 
> non-instrumented classes. for various different classes.
> 
> I'm using Gradle wrapper 6.6.1, latest Jacoco plugin version.
> 
> From the root Gradle file:
> 
> tasks.withType<JacocoReport> {
>   sourceSets(sourceSets.main.get())
>   executionData(tasks.test.get())
>   reports {
>     xml.isEnabled = true
>     html.destination = file("${buildDir}/reports/jacoco/html")
>     xml.destination = file("${buildDir}/reports/jacoco/xml")
>   }
> }
> 
> Then gradle clean cleanClasses buildTests results in these errors
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "JaCoCo and EclEmma Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/c70fcd63-aa31-4905-be33-1063e6a40e25n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/c70fcd63-aa31-4905-be33-1063e6a40e25n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/64101A4C-F5A0-42F2-A763-39BB0BC3FFAE%40mountainminds.com.

Reply via email to