summaryrefslogtreecommitdiffstats
path: root/build/android/gyp/util/build_utils.py
diff options
context:
space:
mode:
authorcjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-14 19:51:58 +0000
committercjhopman@chromium.org <cjhopman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-14 19:51:58 +0000
commit9d20d7d94e5e3ee442be84c3ed7290e57bcba75e (patch)
tree39859f66f4d8f10a929e2cd100ae69cd60839bcf /build/android/gyp/util/build_utils.py
parent80d1a1a649c151aa924ea7efb4738cb193791a71 (diff)
downloadchromium_src-9d20d7d94e5e3ee442be84c3ed7290e57bcba75e.zip
chromium_src-9d20d7d94e5e3ee442be84c3ed7290e57bcba75e.tar.gz
chromium_src-9d20d7d94e5e3ee442be84c3ed7290e57bcba75e.tar.bz2
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
Diffstat (limited to 'build/android/gyp/util/build_utils.py')
-rw-r--r--build/android/gyp/util/build_utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index fa8592b..fb6f4f1 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -85,7 +85,7 @@ def WriteJson(obj, path, only_if_changed=False):
with open(path, 'r') as oldfile:
old_dump = oldfile.read()
- new_dump = json.dumps(obj)
+ new_dump = json.dumps(obj, sort_keys=True, indent=2, separators=(',', ': '))
if not only_if_changed or old_dump != new_dump:
with open(path, 'w') as outfile: