Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transitive dependency on objenesis:3.1 causing Android instrumentation tests to fail #433

Closed
Amokrane opened this issue May 5, 2021 · 1 comment · Fixed by #434
Closed

Comments

@Amokrane
Copy link
Contributor

Amokrane commented May 5, 2021

Hello,

I would like to share an issue we found when we upgraded to mockito-kotlin:3.1.0:

> Could not resolve all files for configuration ':app:detachedConfiguration4'.
   > Failed to transform jetified-objenesis-3.1.jar to match attributes ***artifactType=ext-dex-dexBuilderStagingAndroidTest, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime***.
      > Execution failed for DexingExternalLibArtifactTransform: /home/runner/.gradle/caches/transforms-3/e98713f6f21d16df260ea582e1a3a736/transformed/jetified-objenesis-3.1.jar.
         > Error while dexing.

After reading mockito/mockito#2007, we found out that this issue is caued by early objenesis:3.x versions, and fixed in objenesis:3.2. Unfortunately, mockito-kotlin depends on mockito-core:3.8.0 which brings in the objenesis:3.1 version. As a workaround, we forced objenesis:3.2 version.

Depending on mockito-core:3.9.0 should fix this issue. I have ran the tests locally with this update and they were successful. I can make a PR if you want.

Thank you.

@TimvdLippe
Copy link
Contributor

Yes please open a PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants