Граф коммитов

261 Коммитов

Автор SHA1 Сообщение Дата
dgn 96733264c4 Make instrumentation test dependency on a support APK explicit
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
2015-07-16 16:27:21 +00:00
agrieve 5fd2f11ff5 GN: Fix support errorprone and java_binary
Also adds errorprone to the default set of targets.

BUG=509156

Review URL: https://codereview.chromium.org/1233453010

Cr-Original-Commit-Position: refs/heads/master@{#338803}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 40ba686a6a6cd4387759376bebe505298742ca50
2015-07-15 02:10:35 +00:00
agrieve 5fde6fb722 Run javap with a bigger NewSize to fix crash when processing robolectric.jar
Crash looks like:
GC triggered before VM initialization completed. Try increasing NewSize

BUG=507294

Review URL: https://codereview.chromium.org/1232063008

Cr-Original-Commit-Position: refs/heads/master@{#338625}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b0991387175e0dc39063bdaa0d8fa1ff51ea90a6
2015-07-14 02:37:10 +00:00
agrieve cb0663129c Android GN: Include libstdc++.so when doing a component build
BUG=500882

Review URL: https://codereview.chromium.org/1231723002

Cr-Original-Commit-Position: refs/heads/master@{#338512}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 16c7c9e6dd49f0214c6de31fa0c5cf929bc0e12c
2015-07-13 15:32:13 +00:00
ohrn 5ec29bd726 Add -bootclasspath argument to javac.
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
2015-07-08 13:09:48 +00:00
mikecase 707495d218 [Android] Make dex exclude paths relative to output dir.
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
2015-06-29 21:37:07 +00:00
agrieve 0058fc275c Fix generate_split_manifest.py depending on third-party "lxml" import
Python's xml module works just fine.

BUG=484797

Review URL: https://codereview.chromium.org/1203293002

Cr-Original-Commit-Position: refs/heads/master@{#336387}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11c73372d5f5718227a44ffc98d8ea2634d80170
2015-06-26 16:45:16 +00:00
agrieve 9de8e300f9 Add build rules to enable language-based split apks on Android
BUG=490285

Review URL: https://codereview.chromium.org/1192453002

Cr-Original-Commit-Position: refs/heads/master@{#336001}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c89cfe476f4d1f9bae23e6980a12a379fbd00da4
2015-06-24 21:04:32 +00:00
agrieve f6e07267a1 Load non-locale .pak files directly from the .apk on Android (rather than extracting on start-up).
BUG=394502

Review URL: https://codereview.chromium.org/1181953002

Cr-Original-Commit-Position: refs/heads/master@{#335964}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 05398f5f735ac47b070f7c6897b4d25a1aae8ca9
2015-06-24 19:00:09 +00:00
simonb 191623ed95 Extend relocation packing to non-ARM architectures.
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
2015-06-24 14:46:39 +00:00
bauerb 27e6585932 Enable Java assertions in locally run Java binaries.
BUG=493162

Review URL: https://codereview.chromium.org/1151773003

Cr-Original-Commit-Position: refs/heads/master@{#335825}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: be7e3fef3110e80cc3fc9727f20ded0d69868301
2015-06-24 00:23:47 +00:00
agrieve 901e69f073 Revert "Revert "Android: Store language .pak files in res/raw rather than assets""
This reverts commit bd0057ca4ca5990173e099f5cdd5219c6ed72fd5.
Also adds a "setMandatoryPaksToExtract" overload to prevent breakage.

BUG=371610
TBR=Yaron, Torne, cjhopman, Jaekyun Seok, James Hawkins, gunsch, newt

Review URL: https://codereview.chromium.org/1198193006

Cr-Original-Commit-Position: refs/heads/master@{#335538}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1e54fed611ebeef569a3c452f744ed53ae341991
2015-06-22 19:02:29 +00:00
agrieve b13eeaeb0e Create xxxhdpi density splits when density splits are enabled
The xxxhdpi density was missed in the initial implementation of density
splits.

BUG=488324

Review URL: https://codereview.chromium.org/1192263002

Cr-Original-Commit-Position: refs/heads/master@{#335534}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: aa50092a84c19942281fbf8f3a7dc1d67e9a34bb
2015-06-22 18:51:01 +00:00
raywilliams 6f98f3e388 Add the Errorprone Java Compiler
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
2015-06-22 16:17:59 +00:00
qinmin 97b0580e87 Revert "Android: Store language .pak files in res/raw rather than assets"
This reverts commit f30e04470453ccd7e6a9abf586185b991d174902.
This change breaks android TOT bot
TBR=yfriedman@chromium.org,torne@chromium.org,cjhopman@chromium.org,jaekyun@chromium.org,jhawkins@chromium.org,gunsch@chromium.org,newt@chromium.org,agrieve@chromium.org
BUG=371610

Review URL: https://codereview.chromium.org/1200583002

Cr-Original-Commit-Position: refs/heads/master@{#335432}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bd0057ca4ca5990173e099f5cdd5219c6ed72fd5
2015-06-20 05:26:13 +00:00
aurimas b2069d66aa Make lint fail builds.
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
2015-06-19 22:39:24 +00:00
agrieve 026596734c Android: Store language .pak files in res/raw rather than assets
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
2015-06-19 21:21:24 +00:00
mikecase ed008739ea Add InstallSplitApk function to device utils.
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
2015-06-19 20:44:05 +00:00
yfriedman 49c4ebb56a Extend unknown_deps for build_configs exemption to android_resources.
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
2015-06-19 01:20:15 +00:00
agrieve c46b91c182 Fix invalid depfile generation in generate_split_manifest.py
This caused ninja to crash for incremental builds of ChromeModern.apk

BUG=447152

Review URL: https://codereview.chromium.org/1187903003

Cr-Original-Commit-Position: refs/heads/master@{#335060}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: afad5c2282c80622b28d112f757fe3d6c06dfa1a
2015-06-18 16:26:54 +00:00
simonb 30992e0da3 crazy linker: convert relocation unpacking to Android style.
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
2015-06-08 18:11:58 +00:00
aurimas 374051ceb6 Make aapt and aidl paths flexible.
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
2015-06-04 23:29:15 +00:00
mikecase d587fae3e6 [Android] Generate scripts at build time to run android tests.
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
2015-06-03 00:57:52 +00:00
sgurun 8eeaaf0418 Add style information (font size, bold, italic, etc) and color to the snapshot.
BUG=490893

Review URL: https://codereview.chromium.org/1137393003

Cr-Original-Commit-Position: refs/heads/master@{#332082}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2fe5ccafafe4419c2c5c6a827b50a1d027057fb1
2015-05-30 00:01:48 +00:00
agrieve ab683c7d03 Add split-select logic to apk_install.py & fix crash when --split-apk-path is used
This makes the script able to install the correct density-based split.

BUG=447152

Review URL: https://codereview.chromium.org/1141403002

Cr-Original-Commit-Position: refs/heads/master@{#331205}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 16cd4e3dcbac844d194be8518f9b049a35c7634e
2015-05-22 23:35:43 +00:00
agrieve acf4713cdf Add create_density_splits option to java_apk.gypi / android_apk (gn)
BUG=488324

Review URL: https://codereview.chromium.org/1133603004

Cr-Original-Commit-Position: refs/heads/master@{#331177}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: ac94e41f40bfc5252dc23dd72549d985ca221168
2015-05-22 21:32:41 +00:00
agrieve f0ec0b915a Rename load_library_from_zip_file -> load_library_from_zip
Having load_library_from_zip_file end with "_file" causes a GYP
exception when the value is overriden.

BUG=488135

Review URL: https://codereview.chromium.org/1142353003

Cr-Original-Commit-Position: refs/heads/master@{#330888}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1b841e014d528f802b93c4284b90db39b90b63fc
2015-05-21 04:40:12 +00:00
agrieve 90231a77fb Add minSdkVersion=21 to ABI split manifests
Appears to be required for split-select to work

BUG=484797

Review URL: https://codereview.chromium.org/1142893005

Cr-Original-Commit-Position: refs/heads/master@{#330615}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15390e42957d99e29177576d91d77cb3053a52aa
2015-05-19 21:40:43 +00:00
kkimlabs 2e6f299df8 [Android] Remove v14 resource verification entirely.
BUG=487391

Review URL: https://codereview.chromium.org/1136273003

Cr-Original-Commit-Position: refs/heads/master@{#330439}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6edecc8ca40abd2a82edc78f8d51a1b59543cbca
2015-05-18 22:12:54 +00:00
Gordana.Cmiljanovic ac3f48f7fe Prefer jinja2 from third_party over system library in process_resources.py
Make sure jinja2 from third_party is used.

Review URL: https://codereview.chromium.org/1138383003

Cr-Original-Commit-Position: refs/heads/master@{#330341}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f42e3c492343f9121df5ea85fb15bfa7d2f2fdcb
2015-05-18 09:49:16 +00:00
agrieve 360bbe57da Extract package_resources step into a .gypi & make assets & resource zips optional
This is in preparation for for creating abi splits

BUG=484797

Review URL: https://codereview.chromium.org/1140763002

Cr-Original-Commit-Position: refs/heads/master@{#330188}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: a657e5374014d2125f4fddc319cea852b0c86a96
2015-05-15 20:39:05 +00:00
kkimlabs 25ec01be12 [Android] Add an option to skip v14 resource verification.
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
2015-05-14 22:18:07 +00:00
agrieve 08176b703f Adds GN rule & script for generating AndroidManifest.xml for APK splits
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
2015-05-14 15:03:40 +00:00
agrieve 53c1e9c56a Add --split-apk-path flag to apk_install.py, and install-multiple logic to adb_wrapper
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
2015-05-14 13:58:31 +00:00
cjhopman 0c59052ea0 Don't include tested apks resources in test apk
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
2015-05-12 22:24:01 +00:00
cullinan f2b9b229e1 Reland: Actually use --extra-r-text-files in process_resources.py
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
2015-05-11 19:11:53 +00:00
sky a60b7d24e2 Makes copy_ex handle directories
Currently it only handles files. I would like to use it for a project
that needs to copy directories.

R=cjhopman@chromium.org
BUG=none
TEST=none

Review URL: https://codereview.chromium.org/1134813003

Cr-Original-Commit-Position: refs/heads/master@{#329101}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 450cd07835c8e724cf0cc9f2f3dacfe63832b02b
2015-05-11 06:54:57 +00:00
Benjamin Lerman e8622a9a59 Remove spurious print.
TBR=pasko@chromium.org

Review URL: https://codereview.chromium.org/1135473002

Cr-Original-Commit-Position: refs/heads/master@{#328731}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7e07c87e6b22c04b3f6452ec68b13eee7cc19c8f
2015-05-07 08:43:00 +00:00
cjhopman a7a14d8508 Revert of Actually use --extra-r-text-files in process_resources.py (patchset #6 id:90001 of https://codereview.chromium.org/1104703003/)
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
2015-05-07 00:37:09 +00:00
cullinan 8a93ad9385 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

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
2015-05-06 18:34:01 +00:00
gsennton 2e2f27c8d2 Revert of Use --num-thread=10 when dexing Android code (saves 5 seconds) (patchset #1 id:1 of https://codereview.chromium.org/1109193002/)
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
2015-05-06 13:24:26 +00:00
cjhopman c0bc4f0ef1 Refactor proguard scripts
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
2015-05-05 23:47:46 +00:00
newt 43c75deb59 Fix silly python exception when printing error message.
Oh, Python, I may never understand you completely.

Review URL: https://codereview.chromium.org/1122633002

Cr-Original-Commit-Position: refs/heads/master@{#328046}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e7a8c4e93366cf8a35363f5f43f0c08925c6410
2015-05-02 02:30:32 +00:00
agrieve 21930e9d4e 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=

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
2015-04-28 20:34:52 +00:00
cjhopman 5c8f5e940c Enforce that apk_under_test is used
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
2015-04-24 02:35:21 +00:00
dgn a1d79bf9e4 Fix GN build for junit tests
A dex path was required for all build types while for unit tests
(java_library) we don't provide one.

BUG=480445

Review URL: https://codereview.chromium.org/1083413010

Cr-Original-Commit-Position: refs/heads/master@{#326665}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d88c889bc2b6632810d7eb6f73ae8b4cf851168f
2015-04-23 22:05:53 +00:00
aurimas 06bac5588e Revert of Revert of Roll Android SDK and AppCompat. (patchset #1 id:1 of https://codereview.chromium.org/1092843003/)
Reason for revert:
Downstream needs a fix in styles.xml to roll this in.

Original issue's description:
> Revert of Roll Android SDK and AppCompat. (patchset #2 id:20001 of https://codereview.chromium.org/1101633003/)
>
> Reason for revert:
> Breaks downstream Chrome Android ToT instrumentation test.
> BUG=480285
>
> Original issue's description:
> > Roll Android SDK and AppCompat.
> >
> > - Android SDK rolls to API 22 rev 2
> >   (no API changes, just bug fixes)
> > - Android Support Library rolls to 22.1.0
> >
> > BUG=479858
> >
> > Committed: https://crrev.com/a068236fabb7a1925df7494bd668c2b58b26979a
> > Cr-Commit-Position: refs/heads/master@{#326437}
>
> TBR=newt@chromium.org,cjhopman@chromium.org,aurimas@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=479858
>
> Committed: https://crrev.com/dd703b9316d9b346ec1bf6ec357884d40ffe80e6
> Cr-Commit-Position: refs/heads/master@{#326484}

TBR=newt@chromium.org,cjhopman@chromium.org,pasko@chromium.org,azarchs@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=480285

Review URL: https://codereview.chromium.org/1086523004

Cr-Original-Commit-Position: refs/heads/master@{#326583}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d90131fcdc10b4cdacc3be1e7bac78446708edad
2015-04-23 18:25:11 +00:00
azarchs be73afe292 Revert of Roll Android SDK and AppCompat. (patchset #2 id:20001 of https://codereview.chromium.org/1101633003/)
Reason for revert:
Breaks downstream Chrome Android ToT instrumentation test.
BUG=480285

Original issue's description:
> Roll Android SDK and AppCompat.
>
> - Android SDK rolls to API 22 rev 2
>   (no API changes, just bug fixes)
> - Android Support Library rolls to 22.1.0
>
> BUG=479858
>
> Committed: https://crrev.com/a068236fabb7a1925df7494bd668c2b58b26979a
> Cr-Commit-Position: refs/heads/master@{#326437}

TBR=newt@chromium.org,cjhopman@chromium.org,aurimas@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=479858

Review URL: https://codereview.chromium.org/1092843003

Cr-Original-Commit-Position: refs/heads/master@{#326484}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dd703b9316d9b346ec1bf6ec357884d40ffe80e6
2015-04-23 09:35:38 +00:00
aurimas 89bd9f0e03 Roll Android SDK and AppCompat.
- 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
2015-04-23 02:57:11 +00:00
cjhopman 2691f7237f Make test apks exclude dex files in tested apk
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
2015-04-22 23:32:00 +00:00