Proguard performs a bunch of optimizations, some of which seem to be incompatible with proguard. 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.
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.
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.
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.
Comment 1 by pshmakov@chromium.org
, Sep 18