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

261 Коммитов

Автор SHA1 Сообщение Дата
jbudorick d19e0002f2 [Android] More old_interface conversions in build/android/.
This also creates build/android/pylib/constants/ and moves the existing
constants.py file into it as __init__.py.

BUG=267773

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

Cr-Original-Commit-Position: refs/heads/master@{#326025}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cdb5bb0b94d7d2716a0c826fca576a0efdd33511
2015-04-21 14:04:02 +00:00
qsr e72d01ee1e Prevent spurious warning during the android build.
R=pasko@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#324664}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c3bf4d3ba3f04945c0fa373eab498227cfa9b42e
2015-04-10 18:07:51 +00:00
tsniatowski cb759edee0 jinja2: make templates outside of // work again
A recent CL -- http://crrev.com/1002313002 -- made the jinja wrapper script
barf on templates located outside CHROMIUM_SRC (the used Jinja2 loader
disallows template paths with '..' components). While not actively used
currently in the Chromium build, it is a somewhat useful feature of the
wrapper that used to work.

Fix by instatiating the jinja template loader with a configurable path as the
search directory, rather than a hardcoded CHROMIUM_SRC. Usages with templates
outside CHROMIUM_SRC now must pass an appropriate --loader-base-dir value
to the wrapper script.

R=cjhopman,jbudorick
BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#324597}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 65b1b8d1d29b68df077dfaec40d3fd4e8961758e
2015-04-10 06:45:40 +00:00
torne 78d840220c Remove support for jarjar-ing layout.xml files.
Now that android_webview_build is being removed we no longer need
support for jarjar-ing layout.xml files. Delete the tools used to do
this, as well as the jarjar configuration for android_webview_build.

BUG=440794

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

Cr-Original-Commit-Position: refs/heads/master@{#322860}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15040fcb70a124db6a7886677d0c78cb7624da8a
2015-03-30 20:47:32 +00:00
knn 159718a26f Enable depend on stamp by default for all GN based grit targets.
This is a cleanup change that removes support for the depfile based on
first grit output.

BUG=466315

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

Cr-Original-Commit-Position: refs/heads/master@{#322584}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc28e0dcbe1df4308cce6181ea8cb025ef0d3aeb
2015-03-27 15:49:52 +00:00
kkimlabs d4f849610e [Android] Add bug# to v14 resource generation script comment.
BUG=NONE

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

Cr-Original-Commit-Position: refs/heads/master@{#321842}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ababd1323d0762c3bc9c521b9f7d994601699a5
2015-03-23 20:53:15 +00:00
newt b1eede3a78 jinja2: support file references in templates.
This allows jinja2 templates to reference other templates by path name,
e.g. to extend them or include them.

BUG=467069

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

Cr-Original-Commit-Position: refs/heads/master@{#320963}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 031bd459554280a3653a1541221e224a6678eda2
2015-03-17 20:38:11 +00:00
cjhopman 1fbd94816d Fix android resources in gn builds
Dependent libraries need to be passed in the reverse order that
build_utils.GetSortedTransitiveDependencies returns.

Also, a multi-library resource zip in package_libraries should be sorted
on the numeric values of the directories in the zip, not the string
values.

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

Cr-Original-Commit-Position: refs/heads/master@{#320802}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 46ba0c2ba3d041ee8dac492be81904ee073f4ed8
2015-03-16 22:04:56 +00:00
aurimas a8813db8ea Roll Android SDK to API 22
Updated the following:
- Android SDK Platform API 22
- Android SDK Tools 24.1.2
- Android SDK Platform-tools 22
- Android SDK Build-tools 22
- Android SDK Sources 22
- Android Support Library 21.0.3

BUG=440601

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

Cr-Original-Commit-Position: refs/heads/master@{#320395}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e2a21a01b60eb329e61499458f51ebae7a0951ad
2015-03-12 22:41:47 +00:00
mikecase 2578de936f Adds option to allow lint.py script to exit with nonzero exit status (fail builds).
We want to remove downstream lint script. We will need this script to be able to fail
builds if we want to replace the downstream script with this one.

BUG=266140

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

Cr-Original-Commit-Position: refs/heads/master@{#319481}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2b6f0c85fc4dcdb1746c4ac717b4b71c96e6e22a
2015-03-06 19:49:46 +00:00
newt a353087c19 Silence uninteresting proguard output.
ProGuard outputs boring stuff to stdout (proguard version, jar path,
etc) as well as interesting stuff (notes, warnings, etc). If stdout is
entirely boring, this method suppresses the output.

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

Cr-Original-Commit-Position: refs/heads/master@{#319183}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 20e824209ff87f27e26d8c20bf20b5d0d6795d4e
2015-03-05 01:06:09 +00:00
qsr 2c00d89567 Allow to exlude jar in android_standalone_library.
R=cjhopman@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#318214}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd6ee6d5ce5a42c50d0284daeaa7bd664f58b8fb
2015-02-26 10:53:46 +00:00
mikecase 62c39b0a2e Change what manifest and resources are passed to lint.py.
BUG=266140

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

Cr-Original-Commit-Position: refs/heads/master@{#318153}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 46a78727a03b9aa652201a41ea12ea1e56790e56
2015-02-26 00:10:01 +00:00
mnaganov e1c04e42ea Improve CLI interface of C++ enums to Java generator
1. Print error if input file doesn't have any annotated enums.

2. Convert "mandatory option" 'output_dir' into a positional argument.

3. Fix 'print_output_only' when running from command line.

BUG=458562

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

Cr-Original-Commit-Position: refs/heads/master@{#317783}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4e3301c82c48ac22439d1b9dc34ba05a0599e3e9
2015-02-24 11:56:59 +00:00
etiennej ffc31fc61e Change in android Java build rules for Mojo Java content handler
See https://codereview.chromium.org/898853006 for motivation

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

Cr-Original-Commit-Position: refs/heads/master@{#315959}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 32a8a141c605f608f158801ea863784683e4dd2f
2015-02-12 11:30:13 +00:00
newt dc2c24655c Don't let "aapt crunch" increase image size.
For an image that's already optimized, aapt crunch typically increases
the image size. In this case, we now use the original image instead of
the crunched image. 9-patches, however, must always be crunched, since
crunching adds important metadata to the file.

Currently, this saves 50KB, but has the potential to save up to 300KB
once we optimize all the images in the codebase.

BUG=407781

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

Cr-Original-Commit-Position: refs/heads/master@{#313656}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d7e09cdd4322829368cdad8eb33c784912971a77
2015-01-29 03:05:48 +00:00
eseidel 571e3d9288 Make javac.py assume UTF-8 encoding always
My understanding is that by-default javac
pulls encoding from the user's environment
http://stackoverflow.com/questions/9661935/how-to-change-the-defaults-system-java-encode-form-in-windows
http://stackoverflow.com/questions/11343828/file-encoding-has-no-effect-lc-all-environment-variable-does-it
which is wrong for Chromium where all of our
source files are known to be UTF-8, regardless
of what the user has set in their environment.

In my case I was using Chrome Remote Desktop
to connect to my linux machine and for
whatever reason LANG was missing from the
resulting environment.  After this patch
mojo_shell builds correctly for Android again.

BUG=419378

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

Cr-Original-Commit-Position: refs/heads/master@{#313432}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 32170ad8a272b81d05ccce1d69473ca20d18a16e
2015-01-28 04:13:49 +00:00
tsniatowski 4463c6eb66 Make android jinja wrapper work on utf-8 templates
Jinja2 defaults to utf-8 for templates... unless the template is loaded
using env.from_string. Since we process manifest xml files which are
declared utf-8, the wrapper should treat them as utf-8 properly.

BUG=

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

Cr-Original-Commit-Position: refs/heads/master@{#312352}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dad6da460d13947b90750195bc4957349e670e61
2015-01-21 14:17:54 +00:00
cjhopman f1e25becb7 Fix write_ordered_libraries.py for libraries with odd filenames
Almost any character is valid in a filename. The rest of the pattern
should be restrictive enough that we don't actually match anything that
we don't want.

BUG=427718

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

Cr-Original-Commit-Position: refs/heads/master@{#311397}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4a714c8d99004ed1f882f502dbe65d126e413b4b
2015-01-14 03:03:45 +00:00
mkosiba 4f6fb19ce4 Use parens in multilne C++ -> Java enum generator directives.
Backslashes in comments produce a compile error (as the compiler
interprets them as 'multi-line single-line comments'). This requires
a different way of denoting mulit-line directives. Parens seem
like a reasonably natural syntax for this.

BUG=None
TEST=java_cpp_enum_tests.py
R=jbudorick@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#311073}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2f65eb2d9c327d2bd93d079b7b6c2924e1959df5
2015-01-12 18:40:20 +00:00
Marcin Kosiba c6e99bd131 Add multi-line directives in the C++->Java enum generator.
This makes is possible to specify multi-line directives to the
generator. The primary motivation is to specify long package names
without violating the 80 column limit in C++.

BUG=None
TESTS=java_cpp_enum_tests.py
R=jbudorick@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#310799}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 528e46025bf28be9dc3eb6a8739b6b398903bb27
2015-01-09 18:27:05 +00:00
ppi 22dd633466 GN + Android: extract android_standalone_library rule.
This patch extracts the rule needed to produce a standalone .dex.jar for
a set of Java dependencies into a separate rule. This allows to package
any android library into a standalone .dex.jar file without affecting
the target being packaged.

BUG=437290

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

Cr-Original-Commit-Position: refs/heads/master@{#307575}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7d7c32ec12774eaf22c901194ff9f788a1dcc9b2
2014-12-09 23:09:35 +00:00
ppi 6f81a9f1aa GN + Android: support standalone .dex.jar output of Android libraries.
This patch allows to set .standalone_dex_path as a variable in the
android_library target. This puts all dependencies together with the
library code in one dex.jar file.

This is needed to produce bundles of Java code packaged as Mojo
applications on Android.

BUG=437290

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

Cr-Original-Commit-Position: refs/heads/master@{#306455}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cc9dcc51638870318f1db8a8ef7b2b6440406292
2014-12-02 21:17:48 +00:00
scottmg fd96972e70 gn format //build
A starting point for doing all of src, and adding a PRESUBMIT.

Includes https://codereview.chromium.org/772663002/ and https://codereview.chromium.org/770053002/.
I haven't pushed new binaries yet.

Generated via:
> cd build
> git ls-files *.gn *.gni | sed -e "s/^/@..\\\\out\\\\Debug\\\\gn format --in-place /" >x.bat && x.bat

The only things that I don't love in the current output are:

1. Turning

    args = [
      "--depfile", rebase_path(depfile, root_build_dir),
      "--android-sdk-tools", rebased_android_sdk_build_tools,
      "--dex-path", rebased_output,
    ]

into:

    args = [
      "--depfile",
      rebase_path(depfile, root_build_dir),
      "--android-sdk-tools",
      rebased_android_sdk_build_tools,
      "--dex-path",
      rebased_output,
    ]

The heuristic for this isn't trivial though, and it also affects e.g. '-Xclang' in cflags, as well
as assignments to temporaries that are later assigned to args.

2. Turning single line

    if (defined(invoker.inputs)) { inputs = invoker.inputs }

into

    if (defined(invoker.inputs)) {
      inputs = invoker.inputs
    }

This could be argued to be an improvement, but as it's very boilerplate-y perhaps an exception to
allow single line in this case is worthwhile. I think there was discussion of new syntax for this
case too, something like "inputs ?= invoker.inputs" maybe.

In both cases, I think it's worthwhile to get formatting turned on, and then go back and special
case these if we decide it's worthwhile.

R=brettw@chromium.org
BUG=348474

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

Cr-Original-Commit-Position: refs/heads/master@{#306305}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b199254f481c5db36d56e83fce40594b06d2b81f
2014-12-02 00:25:35 +00:00
feng 6748b8c503 [Android] Remove the workaround code of a platform bug.
From our UMA and operation feedbacks, we don't see such issue anymore.
(We notified the manufactor of the issue and likely they addressed it
in OTA). The cleanup restores native library name to libchrome.so
instead of libchrome.<VER>.so.

BUG=311644

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

Cr-Original-Commit-Position: refs/heads/master@{#305925}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d9201758ca9e6dc47e36026a4029dae5cc69e4c4
2014-11-27 00:29:05 +00:00
cjhopman da0f4fcf8d Add bypass_platform_checks option to java_library/binary
This allows a target to disable checks that prevent a java library from
depending on an android_library. This is required for the current way
that we build java unittests.

Also, remove provides_android_platform option. This was planned to
support unit tests, but it doesn't really work (at the top-level we want
to depend on both targets that require Android and ones that don't
support Android).

Also fixes some minor target definition issues.

TBR=cpu
BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#305326}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7aac92d873502f8a9676bf6b3a95cdfa8cce82c5
2014-11-22 00:11:16 +00:00
cjhopman 6f30472a54 Greatly improve (non-android) java support
This change fixes java_library and java_prebuilt to actually construct a
classpath based on their dependents. It adds java_binary that is similar
to java_library but also creates a script in $root_build_dir/bin/ to
actually run a java jar (it builds in the classpath and main class so
that it can just be run like a normal executable).

Adds the flags "android" and "has_android_platform" to the java_library
template. An android_library can depend on a java_library only if the
java_libary has "android == true". A java_library can depend on an
android_library only if the java_libary has
"has_android_platform == true".

This merges several of the paths for compiling java between android and
non-android implementations into a single one that just takes a flag
controlling it's behavior (enabling/disabling dex, for example).

Adds a very simple java_binary target. This can be run to ensure it works,
output is printed, and exit code is propagated.

TBR=brettw
BUG=359249,383646,417843

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

Cr-Original-Commit-Position: refs/heads/master@{#304555}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 3d85c6dd6a6540699d3baf583780577327a0cd13
2014-11-18 03:40:00 +00:00
mkosiba 97de8b769b Add support for shared library resources to java_apk build rules for real.
In https://crrev.com/f90b7151cb809d8ec9ab31f7be9e9f8f575fd4d0 I added support
for the process_resources rule but support in package_resources is needed to
generate a compatible .apk file.

BUG=430997

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

Cr-Original-Commit-Position: refs/heads/master@{#304097}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e5c9c76ba67333b430debcaaa5d4880e801114d5
2014-11-13 22:38:15 +00:00
mkosiba 08b093973f Fix java_cpp_enum_tests to run on the bots.
The bots invoke the tests with a different argv[0] causing the script
name to change.

BUG=None

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

Cr-Original-Commit-Position: refs/heads/master@{#303913}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2d82a68bab29b8ade0ae898f51c7cc7df1a5f85d
2014-11-12 23:13:02 +00:00
mkosiba 477078ea61 Add support for shared library resources to java_apk build rules.
BUG=430997

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

Cr-Original-Commit-Position: refs/heads/master@{#303351}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f90b7151cb809d8ec9ab31f7be9e9f8f575fd4d0
2014-11-08 02:08:53 +00:00
mkosiba 65e6491ae0 Add C++11 enum class support to the Java enum class generator.
This adds support for the enum class/struct construct as well as limited
support for fixed types (currently only types that convert to jint are
supported).

BUG=None
TESTS=java_cpp_enum_tests

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

Cr-Original-Commit-Position: refs/heads/master@{#303332}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7fd46f236b16d0dee58a8e0f007029912dea4d9f
2014-11-08 00:15:17 +00:00
newt 18a2001297 Clearer error message when parsing Android XML resource fails.
Previously, when generate_v14_compatible_resources.py encountered an
invalid XML file, it showed an error message that didn't tell which
file it was processing. E.g.:

  Traceback (most recent call last):
    ...
    File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
      parser.Parse(buffer, 0)
  ExpatError: unbound prefix: line 6, column 0

Now it also prints the name of the file that couldn't be parsed. E.g.

  Traceback (most recent call last):
    ...
    File "/usr/lib/python2.7/xml/dom/expatbuilder.py", line 207, in parseFile
      parser.Parse(buffer, 0)
  ExpatError: unbound prefix: line 6, column 0
  Failed to parse XML file: chrome/android/res/layout/my_layout.xml

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

Cr-Original-Commit-Position: refs/heads/master@{#302138}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fcd9c4769cdea951a67a4021a6d8b5f6bec79bbd
2014-10-30 19:56:40 +00:00
cjhopman 18b50381e3 Fix relocation packing in GN
In GN we pass multiple lists of libraries to the relocation packing
script. But, when that script doesn't support that, it just makes the
later ones override the earlier ones. Now, it will append all the lists.

NOTRY=true
BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#301184}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 09ac0842aa0603f504d8877b015dc3d04a0b928f
2014-10-24 20:17:27 +00:00
newt cd7a8f97b1 Add OWNERS for chrome/android/java/res directory.
Changes to these files are always UI-related and should be reviewed by
someone familiar with Chrome Android UI.

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

Cr-Original-Commit-Position: refs/heads/master@{#300990}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 98babcf3410e52f785c8ee210de395accaba7894
2014-10-23 23:52:43 +00:00
cjhopman 42abe1e4b2 GN: make relocation packing work
This adds pretty straightforward conversion of the relocation package
gyp targets.

The android_apk template is updated to use pack_arm_relocations.py
instead of copy_ex.py for copying native libraries into the directory
used to build the apk.  This script will copy the files when relocation
packing is disabled and otherwise will do the relocation packing (just
like it does in gyp).

BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#300969}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 284a11b8e10b24d85247dc447dfb3ae812b75f91
2014-10-23 23:03:46 +00:00
mkosiba c43826dafd Final step of the java_cpp_template -> java_cpp_enum migration.
This CL migrates the remaining gyp/gn rules away from the
java_cpp_template rule.

BUG=405532

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

Cr-Original-Commit-Position: refs/heads/master@{#300881}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dfdc7fb2bcde7ea4a9458967fdc5f7fa15abb3fa
2014-10-23 13:56:31 +00:00
newt 4d9ecaf9dd Turn Chrome Shell's AndroidManifest into a jinja2 template.
This turns Chrome Shell's AndroidManifest.xml into a template which gets
processed at build time to produce the final AndroidManifest.xml that's
used to build the APK.

BUG=163751
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#300409}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: d5366cb1ad27e6bf1ae659f374a9b9dd3186761d
2014-10-21 03:29:29 +00:00
aurimas 2555c50e2a Revert of Temporarily suppress Android API deprecation warnings. (patchset #1 id:1 of https://chromiumcodereview.appspot.com/615163002/)
Reason for revert:
We have switched to L sdk.

Original issue's description:
> Temporarily suppress Android API deprecation warnings.
>
> We will remove this suppression once all of the builders support the L SDK.
>
> BUG=405174,398669,411361,411366,411367,411376,416041
>
> Committed: https://crrev.com/c26c106e7724c400fed9980ce371a1c81d1af849
> Cr-Commit-Position: refs/heads/master@{#297505}

TBR=dmazzoni@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=405174,398669,411361,411366,411367,411376,416041

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

Cr-Original-Commit-Position: refs/heads/master@{#300294}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 899f630a25669232d5817b8a6d7d365fb7adc42a
2014-10-20 17:41:51 +00:00
cjhopman a127a0047d Add ChromeShellTestApk and other chrome/ test stuff
Adds these targets:
//chrome/android:chrome_javatests
//chrome/android:chrome_shell_test_java
//chrome/android:chrome_shell_test_apk
//chrome/android:chrome_sync_shell_test_apk
//chrome/android:uiautomator_tests_java
//chrome/android:uiautomator_tests
//chrome/test/android:chrome_java_test_support
//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_apk
//chrome/test/chromedriver/test/webview_shell:chromedriver_webview_shell_resources

depends on https://codereview.chromium.org/570203002/

TBR=ben
BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#299926}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4fe114e79020c97813df6d36dfb156b834749126
2014-10-16 18:03:16 +00:00
cjhopman 37e0be512f Make chrome_shell_apk build
This mostly just adds the chrome_shell_apk build definition and those of
a whole bunch of targets.

Adds a simple check that when DEPRECATED_java_in_dir is used, it
actually includes the "src" at the end (GYP just assumes that you really
meant that java files are in <(java_in_dir)/src).

Makes the call to process_resources only generate R.java for extra
packages when being run as part of the apk step (otherwise, for
example, both chrome resources and content resources would contain
an R.java for net resources and compilation would fail).

Depends on https://codereview.chromium.org/581273004/

Adds the following targets -- and enables ~300 more (550 counting
template-generated inner targets):

//chrome:chrome_android_core
//chrome/android:chrome_strings_grd
//chrome/android:chrome_java
//chrome/android:activity_type_ids_javagen
//chrome/android:app_banner_metrics_ids_javagen
//chrome/android:resource_id_javagen
//chrome/android:profile_account_management_metrics_javagen
//chrome/android:profile_sync_service_model_type_selection_javagen
//chrome/android:toolbar_model_security_levels_javagen
//chrome/android:tab_load_status_javagen
//chrome/android:chrome_shell_base
//chrome/android:chrome_shell
//chrome/android:chrome_sync_shell
//chrome/android:chrome_shell_resources
//chrome/android:chrome_shell_java
//chrome/android:chrome_shell_assets
//chrome/android:chrome_shell_apk
//chrome/android:chrome_sync_shell_apk
//components/bookmarks:bookmarks_java
//components/bookmarks:bookmarks_jni_headers
//components/bookmarks:bookmark_type_javagen
//components/dom_distiller/android:dom_distiller_core_java
//components/dom_distiller/android:dom_distiller_core_font_family_javagen
//components/dom_distiller/android:dom_distiller_core_theme_javagen
//components/enhanced_bookmarks:jni_headers
//components/enhanced_bookmarks/android:enhanced_bookmarks_java
//components/gcm_driver:gcm_driver_java
//components/gcm_driver:jni_headers
//components/navigation_interception/android:navigation_interception_java
//components/variations:variations_java
//components/web_contents_delegate_android:web_contents_delegate_android
//components/web_contents_delegate_android:web_contents_delegate_android_java
//components/web_contents_delegate_android:web_contents_delegate_android_jni_headers
//printing:printing_java
//sync:fake_server_jni
//sync:sync_java_test_support
//sync:test_support_sync_fake_server_android
//sync:sync_unit_tests_apk
//sync/android:sync_java
//sync/android:sync_javatests

BUG=359249
TBR=ben

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

Cr-Original-Commit-Position: refs/heads/master@{#299381}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 11a68cbf1df1110ebac0b649edf2aef22682387e
2014-10-13 22:48:10 +00:00
jbudorick f26ebfbec6 [Android] Reland of 'Add zip pushing and refine push mode selection.'
BUG=400440

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

Cr-Original-Commit-Position: refs/heads/master@{#299284}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8c07d893d4c539c6097e8b249c96785e98c1a9e8
2014-10-13 11:40:06 +00:00
jbudorick 0731401a45 Revert of [Android] Add zip pushing and refine push mode selection.
Broke telemetry_perf_unittests on Android Tests.

TBR=craigdh@chromium.org,cjhopman@chromium.org,klundberg@chromium.org,tonyg@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=400440

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

Cr-Original-Commit-Position: refs/heads/master@{#299133}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 7eed7e0b28a56d5f18805cff73459115c4c31d5f
2014-10-10 17:19:46 +00:00
jbudorick a498db7ac9 [Android] Add zip pushing and refine push mode selection.
This patch revises the implementation of DeviceUtils.PushChangedFiles
and changes its interface (slightly).

PushChangedFiles now:
  - takes a list of (host_path, device_path) tuples, each of which are
    analogous to the original parameters.
  - continues to use AndroidCommands.GetFilesChanged to determine which
    files need pushing
  - attempts to pick the fastest method out of:
    - individual file pushes
    - entire directory pushes
    - zip-push-unzip

BUG=400440

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

Cr-Original-Commit-Position: refs/heads/master@{#299098}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b53e3ccca7fa26a51f3980f250f5527581324316
2014-10-10 12:44:06 +00:00
sashab 2c26b2b70d Extended java_cpp_enum to parse enums with set values
Extended java_cpp_enum to parse enums that have values set for some of
the enums. Also fixed a small bug where enum values with comments on the
same line (following the enum) were being ignored.

BUG=NONE

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

Cr-Original-Commit-Position: refs/heads/master@{#299009}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8bf011fd19739f5b6c85c87e0928de84ed487476
2014-10-09 23:48:51 +00:00
simonb b458fde66d Name packed relocations section appropriately for arm64.
Arm uses .rel.dyn, and arm64 .rela.dyn.  For consistency, name the
packed relocations section as '.android.rela.dyn' for arm64, and
leave '.android.rel.dyn' for arm32.

[ No semantic effect, since packing and unpacking tools treat both
section names identically, and use the signature at the start of
section data to indicate content type. ]

BUG=385553

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

Cr-Original-Commit-Position: refs/heads/master@{#298515}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 1ddabff1f7612387b7578d3855cb5ba9729de9f2
2014-10-07 17:30:49 +00:00
simonb 5a001c2ca6 Move version branding to before relocation packing.
Objcopy knows nothing about the dynamic tags that point to packed
relocation data.  If objcopy is run after relocation packing, and if it
moves the .android.rel.dyn section, these dynamic tags become invalid
and the crazy linker cannot load the library:

E/chromium_android_linker( 9584): Open:
    Could not open libchrome.2180.0.so:
    Bad packed relocations ident, expected APR1 or APA1

Currently, version branding happens at the end of building libchrome.so,
and after relocation packing.  Re-order so that relocation packing again
comes after all other strip and/or objcopy operations.

BUG=417510

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

Cr-Original-Commit-Position: refs/heads/master@{#298236}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 4749549c06525071692f777fc6a1fa5a9ad7f877
2014-10-06 14:36:16 +00:00
anton 25fbac3e82 Add rename and inflate support to the RezipApk tool.
This removes the need to use the previous "rezip" tool in the build
process. That tool is still used in the LGPL compliance script,
which will need to be addressed separately.

BUG=390618, 388223

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

Cr-Original-Commit-Position: refs/heads/master@{#297866}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5887c778a800c9000e9565b40da65e9979657afd
2014-10-02 18:20:46 +00:00
newt 7b9478cfe8 Ignore "libpng: unknown profile" warnings when running aapt crunch.
These warnings are benign and just add build noise.

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

Cr-Original-Commit-Position: refs/heads/master@{#297563}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e2399de16125324c6cf7038031ddf431419046d7
2014-10-01 00:49:11 +00:00
dmazzoni 6a798e4d44 Temporarily suppress Android API deprecation warnings.
We will remove this suppression once all of the builders support the L SDK.

BUG=405174,398669,411361,411366,411367,411376,416041

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

Cr-Original-Commit-Position: refs/heads/master@{#297505}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c26c106e7724c400fed9980ce371a1c81d1af849
2014-09-30 21:34:04 +00:00
anton 32c2b97e20 Re-invent page aligning libraries in APK file.
With this change setting 'load_library_from_zip_file' to 1 will now
construct the APK with a new tool chain. The purpose of this change is
to contruct the APK in such a way that the page alignment is not broken
by the chrome signing process. To achieve this the tool is written in
Java so it shares the same underlying JarOutputStream implementation.
The key things that we depend on are that the filenames are output in
lexographical order with the META_INF files at the end of the file.
That zipalign adds 4 byte alignment to STORED files and this is done by
adding padding to the zip extra field.

BUG=390618

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

Cr-Original-Commit-Position: refs/heads/master@{#297439}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: c83a88d39329e2a7d8bbc1de280d9e572d2f7c8a
2014-09-30 17:15:52 +00:00
feng 87c5b8608e [Android] Insert chromium version string into native libraries.
When building the native libraries, insert the version string into
native libraries as a section .chromium.verson.

BUG=417510

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

Cr-Original-Commit-Position: refs/heads/master@{#297065}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 29d1208bfd30add739982738a6f11f7b0dbcfcd0
2014-09-26 23:23:04 +00:00
aurimas ea3fb58417 Revert of Revert of Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://codereview.chromium.org/603833002/)
Reason for revert:
*Fingers crossed* all the Android builders are on Java 7 now.
Please comment on
https://code.google.com/p/chromium/issues/detail?id=411503#c31 if you see any Android builders failing to compile due to unknown target version 1.7.

Original issue's description:
> Revert of Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://codereview.chromium.org/601983002/)
>
> Reason for revert:
> Broke Android bots:
> http://build.chromium.org/p/chromium.linux/builders/Android%20Arm64%20Builder%20%28dbg%29/builds/2225
> http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/66337
>
> Original issue's description:
> > Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://chromiumcodereview.appspot.com/579543003/)
> >
> > Reason for revert:
> > All the bots have been switched to Java 7 according to https://code.google.com/p/chromium/issues/detail?id=411503#c19
> >
> > Original issue's description:
> > > Revert of Set the javac target and source to 1.7 (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/545363002/)
> > >
> > > Reason for revert:
> > > Not all bots have Java 7 yet :(
> > >
> > > Original issue's description:
> > > > Set the javac target and source to 1.7
> > > >
> > > > BUG=336589
> > > > TBR=yfriedman@chromium.org
> > > >
> > > > Committed: https://crrev.com/165c0f17fe5760a3f346940d4fb2574d62cfe53b
> > > > Cr-Commit-Position: refs/heads/master@{#295162}
> > >
> > > TBR=cjhopman@chromium.org,yfriedman@chromium.org
> > > NOTREECHECKS=true
> > > NOTRY=true
> > > BUG=336589
> > >
> > > Committed: https://crrev.com/094138696e943744d1489ebb98276b116eafed99
> > > Cr-Commit-Position: refs/heads/master@{#295165}
> >
> > TBR=cjhopman@chromium.org,yfriedman@chromium.org
> > BUG=336589
> >
> > Committed: https://crrev.com/119c6fa8247481d2e36910d30175d0214fd2ece5
> > Cr-Commit-Position: refs/heads/master@{#296630}
>
> TBR=cjhopman@chromium.org,yfriedman@chromium.org,aurimas@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=336589
>
> Committed: https://crrev.com/8be2c3f7a14b6191a5a38f187346ce4a36997a6e
> Cr-Commit-Position: refs/heads/master@{#296632}

TBR=cjhopman@chromium.org,yfriedman@chromium.org,thestig@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=336589

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

Cr-Original-Commit-Position: refs/heads/master@{#296794}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: bd050f35257ecb6ae241c7b886c412caefa75327
2014-09-25 21:17:54 +00:00
thestig f259b3cb78 Revert of Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://codereview.chromium.org/601983002/)
Reason for revert:
Broke Android bots:
http://build.chromium.org/p/chromium.linux/builders/Android%20Arm64%20Builder%20%28dbg%29/builds/2225
http://build.chromium.org/p/chromium.linux/builders/Android%20Builder%20%28dbg%29/builds/66337

Original issue's description:
> Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://chromiumcodereview.appspot.com/579543003/)
>
> Reason for revert:
> All the bots have been switched to Java 7 according to https://code.google.com/p/chromium/issues/detail?id=411503#c19
>
> Original issue's description:
> > Revert of Set the javac target and source to 1.7 (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/545363002/)
> >
> > Reason for revert:
> > Not all bots have Java 7 yet :(
> >
> > Original issue's description:
> > > Set the javac target and source to 1.7
> > >
> > > BUG=336589
> > > TBR=yfriedman@chromium.org
> > >
> > > Committed: https://crrev.com/165c0f17fe5760a3f346940d4fb2574d62cfe53b
> > > Cr-Commit-Position: refs/heads/master@{#295162}
> >
> > TBR=cjhopman@chromium.org,yfriedman@chromium.org
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=336589
> >
> > Committed: https://crrev.com/094138696e943744d1489ebb98276b116eafed99
> > Cr-Commit-Position: refs/heads/master@{#295165}
>
> TBR=cjhopman@chromium.org,yfriedman@chromium.org
> BUG=336589
>
> Committed: https://crrev.com/119c6fa8247481d2e36910d30175d0214fd2ece5
> Cr-Commit-Position: refs/heads/master@{#296630}

TBR=cjhopman@chromium.org,yfriedman@chromium.org,aurimas@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=336589

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

Cr-Original-Commit-Position: refs/heads/master@{#296632}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8be2c3f7a14b6191a5a38f187346ce4a36997a6e
2014-09-25 03:09:37 +00:00
aurimas 117cb85703 Revert of Revert of Set the javac target and source to 1.7 (patchset #1 id:1 of https://chromiumcodereview.appspot.com/579543003/)
Reason for revert:
All the bots have been switched to Java 7 according to https://code.google.com/p/chromium/issues/detail?id=411503#c19

Original issue's description:
> Revert of Set the javac target and source to 1.7 (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/545363002/)
>
> Reason for revert:
> Not all bots have Java 7 yet :(
>
> Original issue's description:
> > Set the javac target and source to 1.7
> >
> > BUG=336589
> > TBR=yfriedman@chromium.org
> >
> > Committed: https://crrev.com/165c0f17fe5760a3f346940d4fb2574d62cfe53b
> > Cr-Commit-Position: refs/heads/master@{#295162}
>
> TBR=cjhopman@chromium.org,yfriedman@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=336589
>
> Committed: https://crrev.com/094138696e943744d1489ebb98276b116eafed99
> Cr-Commit-Position: refs/heads/master@{#295165}

TBR=cjhopman@chromium.org,yfriedman@chromium.org
BUG=336589

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

Cr-Original-Commit-Position: refs/heads/master@{#296630}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 119c6fa8247481d2e36910d30175d0214fd2ece5
2014-09-25 02:43:07 +00:00
phoglund 6b74137567 Revert of Revert of [Android] JUnit runner + gyp changes. (patchset #1 id:1 of https://codereview.chromium.org/597123002/)
Reason for revert:
Didn't help. We probably got scheduled on other, flakier Android devices which caused tests to start flaking, or something else is the root cause.

Original issue's description:
> Revert of [Android] JUnit runner + gyp changes. (patchset #15 id:280001 of https://codereview.chromium.org/574433003/)
>
> Reason for revert:
> Speculative revert: Android test started flaking a ton after this landed. Affected targets androidwebview_instrumentation_tests, chromeshell_instrumentation_tests, contentshell_instrumentation_tests. This CL seems the most likely in the blamelist of https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/15905.
>
> Original issue's description:
> > [Android] JUnit runner + gyp changes.
> >
> > This adds Java code for running junit tests, as well as gyp targets for
> > both runnable and non-runnable host-side JARs.
> >
> > BUG=316383
> >
> > Committed: https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174
> > Cr-Commit-Position: refs/heads/master@{#296340}
>
> TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
> NOTREECHECKS=true
> NOTRY=true
> BUG=316383
>
> Committed: https://crrev.com/54b9408f8b18e3bf3a33343e375186e1949e8e86
> Cr-Commit-Position: refs/heads/master@{#296384}

TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=316383

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

Cr-Original-Commit-Position: refs/heads/master@{#296406}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 6e9dc50aecf078d7826fe8e4611b2c238aab3f23
2014-09-24 14:02:15 +00:00
phoglund 9e1ba0c668 Revert of [Android] JUnit runner + gyp changes. (patchset #15 id:280001 of https://codereview.chromium.org/574433003/)
Reason for revert:
Speculative revert: Android test started flaking a ton after this landed. Affected targets androidwebview_instrumentation_tests, chromeshell_instrumentation_tests, contentshell_instrumentation_tests. This CL seems the most likely in the blamelist of https://build.chromium.org/p/chromium.linux/builders/Android%20Tests/builds/15905.

Original issue's description:
> [Android] JUnit runner + gyp changes.
>
> This adds Java code for running junit tests, as well as gyp targets for
> both runnable and non-runnable host-side JARs.
>
> BUG=316383
>
> Committed: https://crrev.com/2e56d4508e33de5fc60bbbb41c5a5d5534e88174
> Cr-Commit-Position: refs/heads/master@{#296340}

TBR=cjhopman@chromium.org,nyquist@chromium.org,aurimas@chromium.org,jbudorick@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=316383

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

Cr-Original-Commit-Position: refs/heads/master@{#296384}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 54b9408f8b18e3bf3a33343e375186e1949e8e86
2014-09-24 11:13:04 +00:00
jbudorick a5c26cf3a0 [Android] JUnit runner + gyp changes.
This adds Java code for running junit tests, as well as gyp targets for
both runnable and non-runnable host-side JARs.

BUG=316383

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

Cr-Original-Commit-Position: refs/heads/master@{#296340}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e56d4508e33de5fc60bbbb41c5a5d5534e88174
2014-09-24 03:41:33 +00:00
nyquist f8e19886e1 Remove guava from chromium.
This removes the rest of guava from a chromium checkout.

It also removes a workaround in build/android/gyp/javac.py
which sorts input files for javac. The issue was fixed in guava 14
(https://code.google.com/p/guava-libraries/issues/detail?id=950),
but it was never rolled in to chromium.

The last remaining files in third_party/guava are left because
some bots do not delete non-existing DEPS. COPYING is a copy of the
current version of the COPYING file from the guava repository.
See http://crbug.com/380688 for details about the DEPS issue.

BUG=412673

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

Cr-Original-Commit-Position: refs/heads/master@{#296202}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e1aebb5900838ff7c3e83dd54b4e51e88f866f04
2014-09-23 16:41:13 +00:00
feng 6ee2374ae4 [Android] Create native lib placeholder files
Add an action to create placeholder files in native lib directory.

BUG=395038

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

Cr-Original-Commit-Position: refs/heads/master@{#295409}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f1f754bf3385a6f90c45ea4131844e671147f44f
2014-09-18 03:57:55 +00:00
cjhopman f9f01ce3b0 Fix handling of resources
This has several changes:

apks no longer export information about resources (this means to get
resources, a target must depend on the android_resources target).

libraries are only built against their direct resource dependencies. If
a library refers directly to some resource id, it should depend directly
on the corresponding android_resources target.

When building an apk, we now properly create the R.java files for all
the packages of all the apk's resource dependencies.

Since an apk will always have a resources srcjar, it will always have
java code (so remove the no-java path).

BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#295362}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: fed93a9b98c45ad7b0c8d3e3b0b9805d5a5107ac
2014-09-17 22:34:03 +00:00
aurimas dcab769b62 Revert of Set the javac target and source to 1.7 (patchset #2 id:20001 of https://chromiumcodereview.appspot.com/545363002/)
Reason for revert:
Not all bots have Java 7 yet :(

Original issue's description:
> Set the javac target and source to 1.7
>
> BUG=336589
> TBR=yfriedman@chromium.org
>
> Committed: https://crrev.com/165c0f17fe5760a3f346940d4fb2574d62cfe53b
> Cr-Commit-Position: refs/heads/master@{#295162}

TBR=cjhopman@chromium.org,yfriedman@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=336589

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

Cr-Original-Commit-Position: refs/heads/master@{#295165}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 094138696e943744d1489ebb98276b116eafed99
2014-09-16 22:49:50 +00:00
aurimas 56217fa7e1 Set the javac target and source to 1.7
BUG=336589
TBR=yfriedman@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#295162}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 165c0f17fe5760a3f346940d4fb2574d62cfe53b
2014-09-16 22:38:02 +00:00
mkosiba bcf73b21f3 New C++ -> Java enum build rule + parser/generator.
This adds a new build rule for generating Java constants for C++ enums.

BUG=405532
TBR=brettw@chromium.org

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

Cr-Original-Commit-Position: refs/heads/master@{#294153}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9610607d5adf4afd2ad821c94434cd749041268a
2014-09-10 10:54:40 +00:00
kkimlabs 6a0af80dc4 Revert of [Android] Temporarily suppress RTL start&end check error. (patchset #1 id:1 of https://codereview.chromium.org/445753002/)
Reason for revert:
Android SDK fixed the issue, so we can convert back from warning to error.

Original issue's description:
> [Android] Temporarily suppress RTL start&end check error.
>
> The newest Android SDK had start&end attributes in non -v17 resources.
> Temporarily change the checking script from error to warning so that
> people can continue to work before it is fixed. This should be
> reverted once the issue is addressed
>
> BUG=None
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287711

TBR=newt@chromium.org,tedchoc@chromium.org,dfalcantara@chromium.org
BUG=None

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

Cr-Original-Commit-Position: refs/heads/master@{#294038}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 992e0f97595ddf295f15550fcb3e9e5947c90108
2014-09-09 23:54:54 +00:00
cjhopman dd11b15b83 Make base_unittests_apk actually work
This changes the "test" template to create a shared_library (instead of
an executable) on Android. After this, we can actually run
base_unittests with
`build/android/test_runner.py gtest -s base_unnittests`
as normal (though may need to CHROMIUM_OUT_DIR and BUILDTYPE as
appropriate).

This requires adding the following targets:

//testing/android:native_test_native_code
//testing/android:native_test_util
//testing/android:native_test_jni_headers
//tools/android/md5sum:md5sum
//tools/android/md5sum:md5sum_bin
//tools/android/md5sum:md5sum_prepare_dist
//tools/android/md5sum:md5sum_copy_host

Also, makes it so that native executables are stripped (just like shared
libraries). Adds a simple create_native_execuatable_dist template that
sets up a dist directory for the executable (see
build/android/gyp/native_app_dependencies.gyp).

BUG=359249
TBR=rlarocque

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

Cr-Original-Commit-Position: refs/heads/master@{#294032}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e65ead8fb1a1976682356cf824445476584e70f0
2014-09-09 23:27:27 +00:00
cjhopman 0f1865d588 Add content_shell_test_apk and several dependencies
This adds support for android_apk targets without any java included
directly in the target (only included through deps).

This adds the following targets:

//base:base_javatests
//content/public/android:content_javatests
//content/shell/android:content_shell_test_apk
//media/android:media_android_imageformat_list (moved)
//media/android:media_java (moved+fixed)

BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#293897}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 394dfd1052e53e64083daef7cc66055557256dcb
2014-09-09 08:58:14 +00:00
cjhopman c62148dcff Add content_shell_apk target (and a bunch of its dependencies)
The content_shell_apk does not have the full native part that it should.
It builds, installs, starts, loads the native library, and then crashes
when it tries to access missing native parts.

This requires fixes to a bunch of little things:
1. Should only extract java files to compile from srcjars.
2. The way we were creating the single combined resources zip was wrong
because we were clobbering xml files (we should only clobber images, xml
files need to be handled more carefully). Instead of trying to properly
handle xml files, the combined zip now just puts all the different
dependencies in different folders (0/, 1/, etc) and then when packaging
we detect that type of zip and pass all the subdirs to aapt.
3. java_cpp_template with multiple sources needs to have a unique
depfile path for each source
4. jni_generator needs to clear the classlist variable in each loop of
foreach (otherwise gn complains about assigning to non-empty list)
5. a couple parts of apk native lib handling was not skipped for an apk
with no native lib

This adds a bunch of targets:
//base:base_java_test_support
//content/public/android:content_java_resources
//content/public/android:content_java
//content/public/android:content_strings_grd
//content/public/android:gesture_event_type_java
//content/public/android:page_transition_types_java
//content/public/android:popup_item_type_java
//content/public/android:result_codes_java
//content/public/android:selection_event_type_java
//content/public/android:speech_recognition_error_java
//content/public/android:top_controls_state_java
//content/public/android:screen_orientation_values_java
//content/public/android:content_gamepad_mapping_java
//content/public/android:content_jni_headers
//content/shell/android:content_shell_jni_headers
//content/shell/android:libcontent_shell_content_view (partial)
//content/shell/android:content_shell_java_resources
//content/shell/android:content_shell_java
//content/shell/android:content_shell_apk_resources
//content/shell/android:content_shell_apk
//net/android:net_java
//net/android:remote_android_keystore_aidl
//net/android:net_java_test_support
//net/android:net_javatests
//net/android:net_errors_java
//net/android:certificate_mime_types_java
//net/android:cert_verify_status_android_java
//net/android:private_key_types_java
//net/android:net_unittests_apk (disabled)

TBR=yfriedman,thestig
BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#293671}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd7694afb928b265e64be5448bb281ad86771f34
2014-09-08 00:01:46 +00:00
cjhopman d559e35760 Add support for Android aidl and support for gyp's java_in_dir
Adds the android_aidl template to support Android aidl.

Adds a DEPRECATED_java_in_dir to android_library and android_apk. This
will greatly ease the transition from gyp to gn.

Adds BUILD.gn for third_party/eyesfree (using the two new features
added).

TBR=rsleevi
BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#293386}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: dad5f427256371787b536ccdcf08d6493bebb379
2014-09-05 01:06:04 +00:00
aurimas eeb291c6cc [Android] Stop ProGuard from shrinking release test apks.
BUG=163393
NOTRY=true

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

Cr-Original-Commit-Position: refs/heads/master@{#293225}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 2e8e41dc633fbc6b8ce3b3081184c55779603aac
2014-09-03 23:57:11 +00:00
cjhopman@chromium.org 2d32f0b6b8 Add support for prebuilt jars
Mostly just a refactoring of build rules to support prebuilt jars.

Adds support for proguard preprocessing of both prebuilt and
non-prebuilt java libraries.

Adds definitions of all (but for android.jar) of the prebuilt jars that
we need from the sdk.

BUG=359249

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

Cr-Original-Commit-Position: refs/heads/master@{#291464}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 684b22957e09c08e917a63390b04980a67da4fa1
2014-08-22 19:13:57 +00:00
cjhopman@chromium.org cc6e76886b Add linting for java libraries/apks to gn
BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@291240 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-21 23:27:22 +00:00
cjhopman@chromium.org 9c422e4f26 Add native libraries to gn apks
First, change the NativeLibraries template to use preprocessor defines
instead of includes. This allows us to delete all the corresponding
headers.

Then, change the ordered libraries file to be a dict with both the list
of library paths and the java-style list of library names.

Update a bunch of things that used the ordered libraries file to instead
take the list of libraries directly as an argument (as a FileArg in
every case).

Add calculating the list of libraries to write_build_config and add it
to the build config (gn can use this then instead of a separate ordered
libraries file).

Add a simple copy step in gn to set up the native libraries directory
for an apk. Use this directory when creating the apk.

BUG=359249
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@290963 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-21 00:42:57 +00:00
cjhopman@chromium.org 27654960d9 Update lint and findbugs to use jars instead of class files
Now that this is done, we don't need to leave the class files laying
around anymore. So don't.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@288971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-12 15:10:38 +00:00
cjhopman@chromium.org 1597d8570b Enable Android lint by default
BUG=393235

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287823 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 19:12:24 +00:00
aberent@chromium.org 80ebaaeaa1 Revert of Enable Android lint by default (https://codereview.chromium.org/396293002/)
Reason for revert:
Two Android build bots (downstream) are failing as a result of this CL.

Reverting as Android Build Sheriff.

BUG=401020
TBR=cjhopman
NOTRY=true


Original issue's description:
> Enable Android lint by default
> 
> BUG=393235
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287676

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287751 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 10:26:09 +00:00
cjhopman@chromium.org 4ee6f5fd24 Make android_apk template actually create an apk
This is essentially three steps, packaging resources, packaging code,
and then signing+zipaligning the apk.

The apk does not currently contain the native libraries.

Depends on http://crrev.com/386473002/

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287729 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 07:29:42 +00:00
kkimlabs@chromium.org b33da57080 [Android] Temporarily suppress RTL start&end check error.
The newest Android SDK had start&end attributes in non -v17 resources.
Temporarily change the checking script from error to warning so that
people can continue to work before it is fixed. This should be
reverted once the issue is addressed

BUG=None

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287711 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 06:37:40 +00:00
cjhopman@chromium.org d2ebe8979d Enable Android lint by default
BUG=393235

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@287676 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-08-06 04:36:58 +00:00
cjhopman@chromium.org 6a9baf3b27 Add dexing for libraries and apks
Apks need to get the paths to all the dependent library dex files to
merge into the final classes.dex file for the apk.

Depends on http://crrev.com/379333003

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286345 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-29 23:53:07 +00:00
primiano@chromium.org 759e8a6df0 [android_webview] Do not extract webviewchromium.pak
- Change the android_webview_apk gyp files to include the en-US.pak
  file in the apk, which was erroneously missing.
- Add the do_not_compress gyp plumbing to store and zipalign paks in
  the apk (only for the android_webview_apk target).
- Stop decompressing pak files in the android webview shell apk.
- Change aw_browser_main_parts.cc to take advantage of the new AwAssets
  and DataPack/ResourceBundle *FromRegion methods (mmap from the apk).
- Add temporary workaround which loads always the en-US.pak locale, in
  lack of a proper refactoring of i10n_utils and ResourceBundle.

BUG=394502

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286258 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-29 18:11:33 +00:00
cjhopman@chromium.org 5eb3802f61 Add beginnings of android_apk and unittest_apk templates
This adds two templates, android_apk and unittest_apk. unittest_apk is
a simple wrapper of android_apk for packaging gtests into apks.

android_apk currently just does the java compilation, processing
resources, and build_config stuff for apks.

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286031 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-28 23:53:11 +00:00
cjhopman@chromium.org 70872679ea Add an empty native library to gyp_managed_install's incomplete apks
This is required to install these apks on some devices.

BUG=384638

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@286028 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-28 23:49:35 +00:00
simonb@chromium.org c4afee99f3 Restrict relocation packing to Release build.
Pass CONFIGURATION_NAME as an argument to pack_arm_relocations.py, and
turn on packing only if its value is 'Release'.  (CONFIGURATION_NAME
cannot be used in conditionals because it is not resolved until after
the conditional has been processed.)

Prior art:
  https://code.google.com/p/chromium/codesearch#chromium/src/build/android/gyp/apk_obfuscate.py&l=103
  https://code.google.com/p/chromium/codesearch#chromium/src/build/java_apk.gypi&l=742

BUG=385553

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@283721 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-17 09:05:10 +00:00
cjhopman@chromium.org 48b7266b89 Change FileArg syntax
This changes the syntax from:
 @(filepath:key0:key1)
to:
 @FileArg(filepath:key0:key1)

This should make it much easier for someone who encounters this syntax
to figure out what it is (currently a `git grep FileArg` returns only
results about/using this feature).

Also changes it to use a simple regex search instead of adhoc stuff.

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@283484 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-16 20:24:45 +00:00
cjhopman@chromium.org 99dc743552 [Android][gn] Add android resources templates
This adds support for android resources to gn.

Two new templates are introduced:

java_string_grd: This is like gyp's build/java_strings_grd.gypi. It runs
grit and generates Android strings.xml files and then zips them
together.
android_resources: This is the target for android resources. It is
mostly a wrapper around process_resources.py. This is *not part* of
android_library (like it is in gyp). Making these two things separate is
more like facebook's BUCK and google's internal build rules (and gyp's
java.gypi and java_apk.gypi have gotten way too big and complicated).

Changes to the actual build scripts are very minor except for the added
support for andoid_resources to write_build_config.py. Building
resources requires getting all the transitive resource dependencies, and
so this reuses the simple sorted transitive dependency thing from
write_ordered_libraries.py.

TBR=rch@chromium.org
BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@283293 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-16 00:11:03 +00:00
aurimas@chromium.org ceaa28fb3c Start using proguard.jar directly instead of proguard.sh
android_tools/sdk/tools/proguard/bin/proguard.sh was removed with SDK tools
update. https://gerrit.chromium.org/gerrit/#/c/70802/ updates SDK tools
and we want to roll to start using it.

BUG=393019

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282498 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-11 01:49:41 +00:00
aurimas@chromium.org 639aa74125 Update GetNewMetadata function to be more forgiving for directory names.
Fixes an issue when using managed_install=1 with Android L.

BUG=None
NOTRY=true
TBR=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282469 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-10 23:42:25 +00:00
qsr@chromium.org 63daae8c68 Allow the mojo shell to run on android.
This CL does the 3 following things to allow the mojo shell to run:

- Updates java_apk.gypi to allow bundling additional libs.
- Bundle the network service with the mojo shell.
- Updates the shell to look for .so and .cr.so file in the local file
  system for android component build.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@282015 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-09 13:06:44 +00:00
simonb@chromium.org 994d6059d5 Add gyp machinery to build with packed ARM relative relocations.
Add gypi and python files to support packing ARM relative relocations
during the build process.

Define a use_relocation_packer gyp variable to turn ARM relocation
packing on and off (currently set to 0).

BUG=385553

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=281286

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@281433 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-04 19:58:34 +00:00
csharp@chromium.org b6d3169dbe Revert 281286 "Add gyp machinery to build with packed ARM relati..."
Broke Android compile:
FAILED: cd ../../net; python ../build/android/gyp/pack_arm_relocations.py "--enable-packing=0" "--stripped-libraries-dir=../out/Release/gen/stripped_libraries" "--packed-libraries-dir=../out/Release/net_unittests_apk/libs/armeabi-v7a" "--libraries-file=../out/Release/net_unittests_apk/native_libraries.json" "--stamp=../out/Release/net_unittests_apk/pack_arm_relocations.stamp"
Traceback (most recent call last):
  File "../build/android/gyp/pack_arm_relocations.py", line 108, in <module>
    sys.exit(main())
  File "../build/android/gyp/pack_arm_relocations.py", line 99, in main
    CopyArmLibraryUnchanged(library_path, output_path)
  File "../build/android/gyp/pack_arm_relocations.py", line 58, in CopyArmLibraryUnchanged
    shutil.copy(library_path, output_path)
  File "/usr/lib/python2.7/shutil.py", line 117, in copy
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: u'../out/Release/net_unittests_apk/libs/armeabi-v7a/libnet_unittests.so'
ninja: build stopped: subcommand failed.

> Add gyp machinery to build with packed ARM relative relocations.
> 
> Add gypi and python files to support packing ARM relative relocations
> during the build process.
> 
> Define a use_relocation_packer gyp variable to turn ARM relocation
> packing on and off (currently set to 0).
> 
> BUG=385553
> 
> Review URL: https://codereview.chromium.org/358863002

TBR=simonb@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@281303 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-03 18:39:41 +00:00
simonb@chromium.org e2113a6ef4 Add gyp machinery to build with packed ARM relative relocations.
Add gypi and python files to support packing ARM relative relocations
during the build process.

Define a use_relocation_packer gyp variable to turn ARM relocation
packing on and off (currently set to 0).

BUG=385553

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@281286 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-03 17:20:56 +00:00
jbudorick@chromium.org 11654a9745 [Android] Switch to DeviceUtils versions of file functions.
This includes PushChangedFiles, FileExists, PullFile, ReadFile, and WriteFile.

BUG=267773

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@281147 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-03 03:11:07 +00:00
cjhopman@chromium.org 9f9e39c561 Add android_library template and build_configs
This is the GN equivalent of build/java.gypi. It is a template for
creating an Android library including java code and Android resources.

It currently only compiles java files (including files in srcjars from
srcjar targets like java_cpp_template) and zips them together in a .jar
and creates the corresponding .jar.TOC.

Some of the things still to do: proguard_preprocess, android_lint,
emma coverage, dex, everything resources.

Adds android_java_library rule for base_java, guava, and jsr-305.

This add the --java-srcjars argument to javac.py. This will accept a .zip of
.java files and include those files in the compilation. This approach is
preferred over using the --src-gendirs option.

Many of the parts of building Android stuff (libraries, resources, apks)
require knowledge of the dependents of that thing. Examples: javac classpath,
for resources aapt needs to know about all dependents, dexing for an apk
needs to know about all java code going into that apk. For gyp, this is done
primarily with all_dependent_settings. There is then some of this logic in
two particular steps (dexing and proguard). These steps, when building an
instrumentation apk, need to exclude the things in the tested apk and this is
done by having the tested apk essentially write a file saying what it did in
those steps and the test apk reading that file and excluding stuff.

In GN, all_dependent_settings doesn't really work. This change introduces a new
way of calculating and using this information. Specifically .build_config files
and build_utils.ExpandFileArgs(). The build_config file for a target contains
the information that depends on dependents. The logic in write_build_config and
the logic in the template specification are very much tied together (in some
sense, write_build_config is just the part of the template specification
that can actually inspect the dependency graph). With
build_utils.ExpandFileArgs() all the other build scripts are essentially
unaware of the .build_config files and can just be written in a (mostly)
straightforward way.

A large part of the information calculated by the build_config is finding input
files to later actions. This requires that those later actions writes a depfile
that contains any inputs that are specified by the build_config (in the case of
this change, javac and the classpath files). Since a action's script shouldn't
really know about the build_config file and what information it got
from that, it is safest for the action to write *all* of its inputs into the
depfile (but to be correct it only has to write those that aren't explicitly
specified in the build files).

Depends on: https://codereview.chromium.org/341823003/

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@280995 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-02 10:46:46 +00:00
cjhopman@chromium.org cd861ec410 Fix generation of v14 resources
generate_v14_compatible_resources.GenerateV14Resources was deleting and
recreating the output directory. process_resources was calling that
multiple times and reusing the same output directory (and so it would
only actually get v14 resources for the final directory).

Instead, callers of GenerateV14Resources should handle deleting/creating
the output directory for themselves--this is just
generate_v14_compatible_resources.main and process_resources (which was
already handling this itself).

BUG=383803

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@280725 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-07-01 01:45:03 +00:00
anton@chromium.org b77c957d67 Add support for uncompress library in APK to the build system
BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@280346 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-27 16:59:46 +00:00
cjhopman@chromium.org a35d42b462 Add depfile support to android build scripts
This adds the --depfile option to a bunch of android's build scripts
(the ones used by gn). It also adds a simple function in build_utils to
calculate the paths of the imported python files.

Currently, the written depfiles just contain that list of python files
(which is much more accurate than the way this is handled in gyp).

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@279546 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-24 23:38:17 +00:00
cjhopman@chromium.org cf328cf8da Make javac and jar a single build action
This allows us to more accurately specify the outputs of each action (we
can't specify the .class file outputs easily because determing them
essentially requires compiling the .java files).

The lint action still operates directly on the .class files, so we continue to
support specifying a directory for the .class files (but in a very simple to
remove way).

BUG=359249

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@279152 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-23 18:42:13 +00:00
mkosiba@chromium.org 1ff59ada78 JarJar resources when building the android_webview.
The android_webview build will require there only be
a single R class (details in bug).
This change makes the necessary changes to the build
infrastructure for this to happen but the actual swap
to building the webview this way will land as a subsequent
CL.

BUG=387155
build-only change, all trybots compile fine.
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@278849 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-20 22:47:21 +00:00
mkosiba@chromium.org 262a45a811 Check the path in the zip archive not the path to the file.
This check was breaking the Android checked builds.

BUG=internal b/15621260
TBR=cjhopman@chromium.org
// Android-only build-only change, builds fine on Android trybots.
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@277746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-17 13:11:23 +00:00
jbudorick@chromium.org 03de24d4bd [Android] Switch to DeviceUtils version of RunShellCommand.
BUG=267773

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@277508 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-06-16 18:59:30 +00:00