8000 JaCoCo fails to transform byte-buddy v1.17.5 (used by Mockito v5.18.0) during Android instrumentation tests · Issue #1901 · jacoco/jacoco · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
JaCoCo fails to transform byte-buddy v1.17.5 (used by Mockito v5.18.0) during Android instrumentation tests #1901
Closed
@waffiqaziz

Description

@waffiqaziz

Steps to reproduce

  • JaCoCo version: v0.8.13
  • Operating system: Ubuntu 24.04.2 LTS
  • Tool integration: CLI (via Gradle plugin in Android project)
  • Complete executable reproducer: https://github.com/waffiqaziz/example-mockito-jacoco
  • Steps:
    • Clone the repository
    • Update Mockito Android and Mockito Core to v5.18.0 (which uses Byte Buddy v1.17.5)
    • Run instrumentation tests with:
      ./gradlew connectedDebugAndroidTest
      

Expected behaviour

Instrumentation tests should run successfully and JaCoCo should generate code coverage data without any class transformation issues.

Actual behaviour

Instrumentation tests fail due to a JaCoCo transformation issue involving Byte Buddy. Gradle throws the following error:

Execution failed for task ':app:connectedDebugAndroidTest'.
> Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath'.
   > Failed to transform byte-buddy-1.17.5.jar (net.bytebuddy:byte-buddy:1.17.5) to match attributes {artifactType=jacoco-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JacocoTransform: /home/runner/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.5/88450f120903b7e72470462cdbd2b75a3842223c/byte-buddy-1.17.5.jar.

Additional information

This suggests the issue is likely related to a change in Byte Buddy between v1.15.11 and v1.17.5 that conflicts with JaCoCo's class transformation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0