DescriptionMake 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
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=277257
Patch Set 1 : #Patch Set 2 : Rebase #
Total comments: 9
Patch Set 3 : #
Total comments: 2
Patch Set 4 : From the right base this time #Patch Set 5 : Fix bad merge #Patch Set 6 : Rebase #Patch Set 7 : Fix mojo_test_apk :/ #Patch Set 8 : #
Messages
Total messages: 16 (0 generated)
|