vanniktech / Emoji

A library to add Emoji support to your Android / iOS / JVM Application
Apache License 2.0
1.53k stars 292 forks source link

Versions 0.10.0 and above of `emoji-google` break Android builds with coverage enabled #891

Closed AlvaroBrey closed 2 years ago

AlvaroBrey commented 2 years ago

Reproduction steps:

  1. Create new Android project with Android Gradle Plugin at least 7.2.0
  2. Add the library dependency
  3. Enable test coverage in build.gradle:
    buildTypes {
        debug {
            testCoverageEnabled true
        }
    }
  4. Run a coverage report task:
    ./gradlew createDebugCoverageReport 

Result:

> Task :app:mergeExtDexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Failed to transform emoji-google-0.10.0.aar (com.vanniktech:emoji-google:0.10.0) to match attributes {artifactType=android-dex, asm-transformed-variant=NONE, dexing-enable-desugaring=true, dexing-enable-jacoco-instrumentation=true, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JacocoTransform: /home/alvaro/.gradle/caches/transforms-3/4e20d048f2e778a489fe8d3a9b9c3c9c/transformed/emoji-google-0.10.0-runtime.jar.
         > org.gradle.internal.operations.BuildOperationInvocationException (no error message)

Notes

Sample project for reproduction attached: EmojiGoogleTest2.zip

Versions 0.9.0 and below are unaffected. We've had to roll the library back in our repo.

vanniktech commented 2 years ago

Already fixed on master https://github.com/vanniktech/Emoji/pull/884