Add an argument (support_apk_name) to the GYP and GN
instrumentation_test_apk targets to provide a support APK. The
argument is optional, but when present, the build will fail if the
APK is not installable
BUG=501797
Review URL: https://codereview.chromium.org/1208483004
Cr-Original-Commit-Position: refs/heads/master@{#339046}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0ac9fec88bf9a042410192b304ae1bc252df8aa7
This silences the warning "bootstrap class path not set in conjunction
with -source 1.7" when building with OpenJDK 1.8.
The multiple_proguards test was removed as javac will now catch the use
of host packages that do not exist on Android.
BUG=
Review URL: https://codereview.chromium.org/1213433007
Cr-Original-Commit-Position: refs/heads/master@{#337805}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 718538ef3a6e6f7104101ef37502052c88c5641c
Having a problem where the paths to exclude when dexing aren't being
properly matched. For example, I will have
'../../out/Debug/example/example.jar' in my --excluded-paths list,
but '../../../out/Debug/example/example.jar' in the paths to dex and
they won't be matched.
This came about when I tried making an uiautomator instrumentation
apk that did not share the same root as the apk under test.
BUG=
Review URL: https://codereview.chromium.org/1211653002
Cr-Original-Commit-Position: refs/heads/master@{#336651}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4f9c80736b16fc000e97edc0a1fd05fa896e8833
Apply relocation packing to ia32 and mips32 builds.
Deferred for x64 pending migration of an ndk bug fix into the
chromium tree. See b/20532404.
BUG=385553
Review URL: https://codereview.chromium.org/1178573002
Cr-Original-Commit-Position: refs/heads/master@{#335921}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 00ad6ff02565ee933f61b08c7f38723a307d7902
These changes let the errorprone compiler find problems when building Android.
A global flag disabled Errorprone by default.
When enabled, code problems will be shown with suggestions on how to fix them.
BUG=485599
Review URL: https://codereview.chromium.org/1136573002
Cr-Original-Commit-Position: refs/heads/master@{#335509}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6ffb1179d6adf08edd64848b45b7415b6b6de43d
Fix and suppress a bunch of lint warnings to be able to enable
lint build failing.
TBR=boliu@chromium.org,pauljensen@chromium.org,tedchoc@chromium.org,lambroslambrou@chromium.org,damienv@chromium.org
BUG=501471,241521,501591,501593,501900,502030
Review URL: https://codereview.chromium.org/1190103002
Cr-Original-Commit-Position: refs/heads/master@{#335371}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8db283ac6beb49ad8032a8e6c65e4cc76db65ffd
This is a prerequisite for having them live within APK splits.
Although pak files need to be renamed to be stored under res/raw,
ResourceExtractor restores their original name during extraction (so no
change to native code).
All sub-locales are stored and extracted together, just as before.
BUG=371610
Review URL: https://codereview.chromium.org/1158053005
Cr-Original-Commit-Position: refs/heads/master@{#335350}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f30e04470453ccd7e6a9abf586185b991d174902
Adding a InstallSplitApk function to device utils so that our
test runner will be able to support install/testing split
apks.
BUG=
Review URL: https://codereview.chromium.org/1166113002
Cr-Original-Commit-Position: refs/heads/master@{#335336}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 89d5ad7274ce871af5f4cd3f9f0a09b9ff90cf02
Previously only apks were eligible, but both can depend on an
AndroidManifest which doesn't write a build config.
BUG=500587
Review URL: https://codereview.chromium.org/1181613005
Cr-Original-Commit-Position: refs/heads/master@{#335187}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 29d8e3b989cb4938640639ce90de488e5ca90c12
Replace relocation unpacking code with functions that understand
the packing format generated by the Android relocation packer.
Switch to using the Android relocation packer when packing during
build.
BUG=385553
Review URL: https://codereview.chromium.org/1072533002
Cr-Original-Commit-Position: refs/heads/master@{#333293}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e5acfbccce659364606758b687b90488e2f44be2
Android-M sdk moved these build-tools to a different directory
and so we need to be able to set them in GYP_DEFINES for M sdk builds.
BUG=None
Review URL: https://codereview.chromium.org/1162943008
Cr-Original-Commit-Position: refs/heads/master@{#332959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2a145dab21f4db16cca74c3f2d89fe911cc582b1
Making changes so that at build time scripts will be generated that can be used to easily run tests.
BUG=490781
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1120883002
Cr-Original-Commit-Position: refs/heads/master@{#332518}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 56d80d7a4c1ff50bf21112486cc9b2308c7e7bf0
Android AAPT 21+ will automatically move attributes to a version
of the XML file with -vXX resource qualifier. So we no longer need
our generate_v14_compatible_resources.py script.
But AAPT only drops the attributes, so if we don't use our script,
we need to put left/right in addition to start/end in our layout xmls.
The plan is, disabling our script for Android support library and
keep using for ourselves, until we can drop the script entirely
when we discontinue support for JB.
TBR=cjhopman@chromium.org
BUG=487391
Review URL: https://codereview.chromium.org/1136953009
Cr-Original-Commit-Position: refs/heads/master@{#329947}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b7115f8e111708c1e52257c34f91dc1549c298f
Build rule is not hooked up to any targets yet, but will be used in a
future commit to create split APKs.
.gypi also forthcoming.
BUG=447152
Review URL: https://codereview.chromium.org/1118403004
Cr-Original-Commit-Position: refs/heads/master@{#329850}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 81cc62af7059b65fe7d4d6dfd420f7cacd03ddc9
There's a TODO for using split-select, but it won't be necessary until
we have resource splits being generated.
BUG=447152
Review URL: https://codereview.chromium.org/1134353002
Cr-Original-Commit-Position: refs/heads/master@{#329844}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 845f198cd6e47f25d68355898fdff474796e2165
This restricts the test apk's resources to just be those not already
included in the tested apk. Because GN apk targets typically don't
include java of their own, this requires supporting javac+jar for the
case where there is no java files.
Fixes deps so that chrome_shell_test_apk actually builds.
TBR=nyquist,dalecurtis,cbentzel
BUG=359249
Review URL: https://codereview.chromium.org/1127233005
Cr-Original-Commit-Position: refs/heads/master@{#329510}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d4910aba370e4e5d55477b4b857c707d07526f7b
Originally landed in crrev.com/1104703003
Reverted in crrev.com/1129103002 due to breaking GN APKs with no
resouces. This now handles the case where aapt doesn't generate an
R.txt (no resources) by creating an empty R.txt.
Generate extra packages' R.java files only containing the resources
listed in their R.txt files. This significantly reduces the number of
DEX field IDs taken up by resources.
BUG=480036
R=cjhopman,yfriedman
Review URL: https://codereview.chromium.org/1136653002
Cr-Original-Commit-Position: refs/heads/master@{#329219}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4b5d0300e3fa2a382ac3c1c157247a82583d7ed0
Reason for revert:
Breaks gn apks with no resources.
Original issue's description:
> Actually use --extra-r-text-files in process_resources.py
>
> Generate extra packages' R.java files only containing the resources
> listed in their R.txt files. This significantly reduces the number of
> DEX field IDs taken up by resources.
>
> BUG=480036
> R=cjhopman
>
> Committed: https://crrev.com/a92cf235709397c737d5d9fdbadfb62e497c0334
> Cr-Commit-Position: refs/heads/master@{#328565}
TBR=yfriedman@chromium.org,msw@chromium.org,cullinan@amazon.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=480036
Review URL: https://codereview.chromium.org/1129103002
Cr-Original-Commit-Position: refs/heads/master@{#328664}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 61ff577cdede4b1e04846ef4af71659d194219b0
Generate extra packages' R.java files only containing the resources
listed in their R.txt files. This significantly reduces the number of
DEX field IDs taken up by resources.
BUG=480036
R=cjhopman
Review URL: https://codereview.chromium.org/1104703003
Cr-Original-Commit-Position: refs/heads/master@{#328565}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a92cf235709397c737d5d9fdbadfb62e497c0334
Reason for revert:
This patch makes the creation of dex files non-deterministic -- dex files from different runs of the same build might not be exactly similar.
This is a problem because for 64-bit webview APKs we need to merge a 32-bit APK into the 64-bit APK (to make 32-bit apps work). When we do this we check that the files in the different APks are similar and this check doesn't work if the dex files in the two APKs are not exactly the same.
https://code.google.com/p/chromium/issues/detail?id=483665
Original issue's description:
> Use --num-thread=10 when dexing Android code (saves 5 seconds)
>
> Timing for creating chrome_apk/classes.dex:
>
> No flag:
> real 0m10.767s
> user 0m16.480s
> sys 0m0.444s
>
> --num-threads=4
> real 0m7.450s
> user 0m11.837s
> sys 0m0.606s
>
> --num-threads=10 (or 20, or 80)
> real 0m5.399s
> user 0m9.266s
> sys 0m0.420s
>
> Timings performed on a z620 workstation.
>
> BUG=
>
> Committed: https://crrev.com/0f9ad3a20275b77d228f67c2edd89dbea0e3e9ea
> Cr-Commit-Position: refs/heads/master@{#327358}
TBR=cjhopman@chromium.org,thestig@chromium.org,agrieve@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=
Review URL: https://codereview.chromium.org/1129793002
Cr-Original-Commit-Position: refs/heads/master@{#328521}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a9975e3af252dbb1f28b55ed5398731e576b482e
Currently, we use proguard from two places: proguard.py and apk_obfuscate.py.
These are used to preprocess libraries and to process full apks, respectively.
This extracts construction/running/filtering output of the actual proguard
command to a simple builder class that is then used in both places. This makes
some parts of how proguard is run to be more consistent between the two.
proguard.py now supports running proguard in the way needed for apks. (GN will
be using proguard.py instead of apk_obfuscate.py)
BUG=359249,478319
Review URL: https://codereview.chromium.org/1103013002
Cr-Original-Commit-Position: refs/heads/master@{#328439}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e852f8d50a4c65f0de6fcc3753abdc8ba3b22a9e
Timing for creating chrome_apk/classes.dex:
No flag:
real 0m10.767s
user 0m16.480s
sys 0m0.444s
--num-threads=4
real 0m7.450s
user 0m11.837s
sys 0m0.606s
--num-threads=10 (or 20, or 80)
real 0m5.399s
user 0m9.266s
sys 0m0.420s
Timings performed on a z620 workstation.
BUG=
Review URL: https://codereview.chromium.org/1109193002
Cr-Original-Commit-Position: refs/heads/master@{#327358}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 0f9ad3a20275b77d228f67c2edd89dbea0e3e9ea
An apk may provide instrumentation for itself or another apk. When
providing instrumentation for another apk, the target for that apk
should be added to the android_apk() target as apk_under_test. This
ensures that the instrumentation apk is built correctly.
TBR=yfriedman@chromium.org
BUG=359249
Review URL: https://codereview.chromium.org/1072193011
Cr-Original-Commit-Position: refs/heads/master@{#326723}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d61e56e5b33c3c19db6fd6bf4e2536a982d42ec2
- Android SDK rolls to API 22 rev 2
(no API changes, just bug fixes)
- Android Support Library rolls to 22.1.0
BUG=479858
Review URL: https://codereview.chromium.org/1101633003
Cr-Original-Commit-Position: refs/heads/master@{#326437}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a068236fabb7a1925df7494bd668c2b58b26979a
This adds the apk_under_test variable to the android_apk template. When this is
set, we will build the apk as though it is an instrumentation test for the apk
set in apk_under_test. When building an instrumentation test apk, the dex file
should not contain libraries that are already included in the apk_under_test
(the dex files from both apks are loaded into the classloader when running
tests).
The dex files to be included are calculating in write_build_config.py.
BUG=359249
Review URL: https://codereview.chromium.org/1096793003
Cr-Original-Commit-Position: refs/heads/master@{#326398}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7b9ba2e6b4f149845360a6e0f3fa4b0ac459e6be