Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(160)

Issue 321883002: Make test apks only dex files not in tested apk (proguard version) (Closed)

Created:
6 years, 6 months ago by cjhopman
Modified:
6 years, 6 months ago
Reviewers:
Yaron
CC:
chromium-reviews, klundberg+watch_chromium.org, bulach+watch_chromium.org, yfriedman+watch_chromium.org, ilevy-cc_chromium.org
Visibility:
Public.

Description

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 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 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+81 lines, -22 lines) Patch
M build/android/dex_action.gypi View 1 chunk +1 line, -1 line 0 comments Download
M build/android/gyp/apk_obfuscate.py View 1 2 3 4 5 6 7 5 chunks +47 lines, -11 lines 0 comments Download
M build/android/gyp/util/build_utils.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M build/java_aidl.gypi View 1 2 1 chunk +1 line, -1 line 0 comments Download
M build/java_apk.gypi View 1 2 3 4 5 6 6 chunks +31 lines, -8 lines 0 comments Download

Messages

Total messages: 16 (0 generated)
cjhopman
yfriedman: *
6 years, 6 months ago (2014-06-10 17:36:43 UTC) #1
Yaron
https://codereview.chromium.org/321883002/diff/40001/build/android/gyp/apk_obfuscate.py File build/android/gyp/apk_obfuscate.py (right): https://codereview.chromium.org/321883002/diff/40001/build/android/gyp/apk_obfuscate.py#newcode102 build/android/gyp/apk_obfuscate.py:102: if 'Release' in options.configuration_name and options.proguard_enabled: needs rebase :) ...
6 years, 6 months ago (2014-06-11 00:45:27 UTC) #2
cjhopman
https://codereview.chromium.org/321883002/diff/40001/build/android/gyp/apk_obfuscate.py File build/android/gyp/apk_obfuscate.py (right): https://codereview.chromium.org/321883002/diff/40001/build/android/gyp/apk_obfuscate.py#newcode102 build/android/gyp/apk_obfuscate.py:102: if 'Release' in options.configuration_name and options.proguard_enabled: On 2014/06/11 00:45:26, ...
6 years, 6 months ago (2014-06-12 20:36:45 UTC) #3
Yaron
looks like a different diffbase or issue while rebasing https://codereview.chromium.org/321883002/diff/40001/build/java_apk.gypi File build/java_apk.gypi (right): https://codereview.chromium.org/321883002/diff/40001/build/java_apk.gypi#newcode165 build/java_apk.gypi:165: ...
6 years, 6 months ago (2014-06-12 23:23:16 UTC) #4
cjhopman
On 2014/06/12 23:23:16, Yaron wrote: > looks like a different diffbase or issue while rebasing ...
6 years, 6 months ago (2014-06-13 17:43:15 UTC) #5
Yaron
lgtm
6 years, 6 months ago (2014-06-13 17:52:02 UTC) #6
cjhopman
The CQ bit was checked by cjhopman@chromium.org
6 years, 6 months ago (2014-06-13 18:03:46 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/321883002/120001
6 years, 6 months ago (2014-06-13 18:05:36 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium ...
6 years, 6 months ago (2014-06-13 21:40:30 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-13 21:46:25 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_clang_dbg/builds/152058) android_dbg on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/195633)
6 years, 6 months ago (2014-06-13 21:46:26 UTC) #11
cjhopman
The CQ bit was checked by cjhopman@chromium.org
6 years, 6 months ago (2014-06-14 00:26:47 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/321883002/140001
6 years, 6 months ago (2014-06-14 00:30:00 UTC) #13
cjhopman
The CQ bit was checked by cjhopman@chromium.org
6 years, 6 months ago (2014-06-14 01:37:24 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/cjhopman@chromium.org/321883002/160001
6 years, 6 months ago (2014-06-14 01:42:09 UTC) #15
commit-bot: I haz the power
6 years, 6 months ago (2014-06-14 19:52:05 UTC) #16
Message was sent while issue was closed.
Change committed as 277257

Powered by Google App Engine
This is Rietveld 408576698