New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 885235 link

Starred by 2 users

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Make mockito for instrumentation tests cooperate with proguard

Project Member Reported by jbudorick@chromium.org, Sep 18

Issue description

Proguard performs a bunch of optimizations, some of which seem to be incompatible with mockito. https://chromium.googlesource.com/chromium/src/+/75b3fa24ce8af90fd909c9d58167a06bc3abdfc5 was one example of this, but there are other optimizations that likely need to be disabled, too. Some of these may adversely affect the build -- e.g., disabling the similar method/marking/final annotation seems to cause one of the APKs to exceed the dex limit.
 
Cc: pshmakov@chromium.org
Description: Show this description
Cc: bsazonov@chromium.org
Hit this with https://crrev.com/c/1238559/8.

Copying error string to make it searchable: 
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation.
Cc: smaier@chromium.org
I believe that this may be partially fixed by https://chromium-review.googlesource.com/c/chromium/src/+/1394387/4/testing/android/proguard_for_test.flags

This will deal with certain class merging optimizations. However, there can definitely be other optimizations which could be broken, but I'm not sure if this can ever get to bulletproof state (without disabling a lot of optimizations), since Mockito does a lot of reflection under the covers.

Sign in to add a comment