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

Issue 1581563003: [Android] Rework multidex and enable multidex for unit_tests_apk. (Closed)

Created:
4 years, 11 months ago by jbudorick
Modified:
4 years, 11 months ago
CC:
chromium-reviews, dgn, jbudorick+watch_chromium.org, klundberg+watch_chromium.org, mikecase+watch_chromium.org, mlamouri (slow - plz ping), vmpstr+watch_chromium.org, yfriedman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Rework multidex and enable multidex for unit_tests_apk. This allows multidex to be used in release builds. BUG=272790 Committed: https://crrev.com/f743bef34d49987c0f1f69e2f0bb6cb8beb03bf5 Cr-Commit-Position: refs/heads/master@{#369715}

Patch Set 1 #

Total comments: 5

Patch Set 2 : thakis comment #

Patch Set 3 : rebase #

Patch Set 4 : don't generate ChromiumMultiDex.java for instrumentation test apks #

Patch Set 5 : fix gyp #

Patch Set 6 : #

Patch Set 7 : fix junit tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+136 lines, -147 lines) Patch
M base/BUILD.gn View 1 2 3 4 5 6 3 chunks +4 lines, -5 lines 0 comments Download
M base/android/java/src/org/chromium/base/BaseChromiumApplication.java View 2 chunks +2 lines, -2 lines 0 comments Download
A + base/android/java/src/org/chromium/base/multidex/ChromiumMultiDexInstaller.java View 7 chunks +6 lines, -10 lines 0 comments Download
M base/android/java/templates/ChromiumMultiDex.template View 1 chunk +10 lines, -103 lines 0 comments Download
M base/base.gyp View 1 2 3 4 5 6 4 chunks +10 lines, -4 lines 0 comments Download
M base/test/android/javatests/src/org/chromium/base/test/BaseInstrumentationTestRunner.java View 2 chunks +2 lines, -2 lines 0 comments Download
M build/android/gyp/configure_multidex.py View 2 chunks +41 lines, -9 lines 0 comments Download
M build/android/java_cpp_template.gypi View 1 2 chunks +0 lines, -2 lines 0 comments Download
M build/config/android/rules.gni View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
M build/java_apk.gypi View 1 2 3 4 5 4 chunks +40 lines, -10 lines 0 comments Download
M chrome/chrome_tests_unit.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M testing/android/native_test/java/src/org/chromium/native_test/NativeTestActivity.java View 2 chunks +3 lines, -0 lines 0 comments Download
M testing/test.gni View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 34 (16 generated)
jbudorick
The unit_tests_apk target is currently over 63k java methods in both debug and release builds, ...
4 years, 11 months ago (2016-01-12 03:34:48 UTC) #2
Nico
should some of the gni changes in https://codereview.chromium.org/1451483002/ be undone, or are they still needed? ...
4 years, 11 months ago (2016-01-12 03:42:12 UTC) #3
agrieve
https://codereview.chromium.org/1581563003/diff/1/build/config/android/rules.gni File build/config/android/rules.gni (right): https://codereview.chromium.org/1581563003/diff/1/build/config/android/rules.gni#newcode1497 build/config/android/rules.gni:1497: _srcjar_deps += [ ":${_template_name}__multidex_config_java" ] I think this adds ...
4 years, 11 months ago (2016-01-12 03:48:28 UTC) #4
jbudorick
thakis: the gni changes from https://codereview.chromium.org/1451483002/ are still needed. https://codereview.chromium.org/1581563003/diff/1/base/base.gyp File base/base.gyp (left): https://codereview.chromium.org/1581563003/diff/1/base/base.gyp#oldcode1492 base/base.gyp:1492: ...
4 years, 11 months ago (2016-01-12 04:48:12 UTC) #5
agrieve
lgtm https://codereview.chromium.org/1581563003/diff/1/build/config/android/rules.gni File build/config/android/rules.gni (right): https://codereview.chromium.org/1581563003/diff/1/build/config/android/rules.gni#newcode1497 build/config/android/rules.gni:1497: _srcjar_deps += [ ":${_template_name}__multidex_config_java" ] On 2016/01/12 04:48:11, ...
4 years, 11 months ago (2016-01-12 20:25:46 UTC) #6
Nico
rs-lgtm
4 years, 11 months ago (2016-01-12 20:29:27 UTC) #7
Yaron
lgtm
4 years, 11 months ago (2016-01-12 22:43:22 UTC) #8
jbudorick
+phajdan for testing/ owners
4 years, 11 months ago (2016-01-14 14:38:28 UTC) #11
Paweł Hajdan Jr.
testing LGTM
4 years, 11 months ago (2016-01-14 15:43:14 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581563003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581563003/40001
4 years, 11 months ago (2016-01-14 23:37:51 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581563003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581563003/60001
4 years, 11 months ago (2016-01-15 05:07:59 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/9102)
4 years, 11 months ago (2016-01-15 05:35:19 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581563003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581563003/80001
4 years, 11 months ago (2016-01-15 06:19:46 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: android_clang_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_clang_dbg_recipe/builds/8699)
4 years, 11 months ago (2016-01-15 06:40:41 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1581563003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1581563003/120001
4 years, 11 months ago (2016-01-15 08:54:26 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 11 months ago (2016-01-15 09:59:20 UTC) #31
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/f743bef34d49987c0f1f69e2f0bb6cb8beb03bf5 Cr-Commit-Position: refs/heads/master@{#369715}
4 years, 11 months ago (2016-01-15 10:00:13 UTC) #33
vasilii
4 years, 11 months ago (2016-01-15 10:17:59 UTC) #34
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/1587253003/ by vasilii@chromium.org.

The reason for reverting is: Broke compilation on Android 

https://build.chromium.org/p/chromium/builders/Android/builds/50665

FAILED: cd ../../components; python ../build/android/gyp/apk_obfuscate.py
--configuration-name Release --android-sdk
/b/build/slave/Android/build/src/third_party/android_tools/sdk//platforms/android-23
--android-sdk-tools
/b/build/slave/Android/build/src/third_party/android_tools/sdk//build-tools/23.0.1
--android-sdk-jar
/b/build/slave/Android/build/src/third_party/android_tools/sdk//platforms/android-23/android.jar
"--input-jars-paths=/b/build/slave/Android/build/src/third_party/android_tools/sdk//extras/android/support/multidex/library/libs/android-support-multidex.jar
\"../out/Release/lib.java/jsr_305_javalib.jar\"
\"../out/Release/lib.java/base_java.jar\"
/b/build/slave/Android/build/src/third_party/android_tools/sdk//extras/android/support/annotations/android-support-annotations.jar
\"../out/Release/lib.java/cronet_api.jar\"
\"../out/Release/lib.java/url_java.jar\"
\"../out/Release/lib.java/net_java.jar\"
\"../out/Release/lib.java/cronet_java.jar\"
\"../out/Release/lib.java/chromium_apk_cronet_perf_test_apk.jar\""
"--proguard-configs=cronet/android/proguard.cfg
\"../out/Release/cronet_perf_test_apk/proguard.txt\"" --test-jar-path
../out/Release/test.lib.java/CronetPerfTest.jar --obfuscated-jar-path
../out/Release/cronet_perf_test_apk/obfuscated.jar --proguard-jar-path
../third_party/proguard/lib/proguard.jar --stamp
../out/Release/cronet_perf_test_apk/obfuscate.stamp --testapp --proguard-enabled
Traceback (most recent call last):
  File "../build/android/gyp/apk_obfuscate.py", line 185, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../build/android/gyp/apk_obfuscate.py", line 167, in main
    DoProguard(options)
  File "../build/android/gyp/apk_obfuscate.py", line 124, in DoProguard
    proguard.CheckOutput()
  File
"/b/build/slave/Android/build/src/build/android/gyp/util/proguard_util.py", line
180, in CheckOutput
    stderr_filter=stderr_filter)
  File "/b/build/slave/Android/build/src/build/android/gyp/util/build_utils.py",
line 162, in CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd
/b/build/slave/Android/build/src/components; java -jar
../third_party/proguard/lib/proguard.jar -forceprocessing -libraryjars
/b/build/slave/Android/build/src/third_party/android_tools/sdk//platforms/android-23/android.jar
-injars
/b/build/slave/Android/build/src/third_party/android_tools/sdk//extras/android/support/multidex/library/libs/android-support-multidex.jar:../out/Release/lib.java/jsr_305_javalib.jar:../out/Release/lib.java/base_java.jar:/b/build/slave/Android/build/src/third_party/android_tools/sdk//extras/android/support/annotations/android-support-annotations.jar:../out/Release/lib.java/cronet_api.jar:../out/Release/lib.java/url_java.jar:../out/Release/lib.java/net_java.jar:../out/Release/lib.java/cronet_java.jar:../out/Release/lib.java/chromium_apk_cronet_perf_test_apk.jar
-include cronet/android/proguard.cfg -include
../out/Release/cronet_perf_test_apk/proguard.txt -outjars
../out/Release/cronet_perf_test_apk/obfuscated.jar -dump
../out/Release/cronet_perf_test_apk/obfuscated.jar.dump -printseeds
../out/Release/cronet_perf_test_apk/obfuscated.jar.seeds -printusage
../out/Release/cronet_perf_test_apk/obfuscated.jar.usage -printmapping
../out/Release/cronet_perf_test_apk/obfuscated.jar.mapping )
Warning: org.chromium.base.multidex.ChromiumMultiDexInstaller: can't find
referenced class org.chromium.base.multidex.ChromiumMultiDex
Warning: org.chromium.base.multidex.ChromiumMultiDexInstaller: can't find
referenced class org.chromium.base.multidex.ChromiumMultiDex
Warning: there were 2 unresolved references to classes or interfaces.
         You may need to specify additional library jars (using '-libraryjars').
Error: Please correct the above warnings first..

Powered by Google App Engine
This is Rietveld 408576698