Make test apks only dex files not in tested apk (proguard version)

At runtime, the classloader will look for classes in both apk's dex
files. In the standard Android build system, an instrumentation test
apk's dex file does not include the classes included in the tested apk's
dex file.

To do this, when doing obfuscation for an apk, write the list of
libraries included in the obfuscated jar and the list of proguard config
files. Then, when proguarding the test apk's code, exclude those
libraries included in the tested apk, use the configs from the tested
apk, and apply the proguard mapping (the renames from obfuscation). Also
add some extra test-specific proguard options.

Now that the test apk does not bundle its own copy of all the tested
apk's classes, some things may need to be kept in the main apk just for
tests. However, we already keep everything in org.chromium.** and
com.google.android.apps.** because of the fact that the test apk was
using its own copy of all the classes and so we couldn't depend on the
tests to actually catch us from over-optimizing with proguard.

BUG=272790

Review URL: https://codereview.chromium.org/321883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277257 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 9d20d7d94e5e3ee442be84c3ed7290e57bcba75e
1 file changed
tree: 426a5805a0b52b9edb8d87b4c4b6bc0f5ecf0f0e
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/