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

57 Коммитов

Автор SHA1 Сообщение Дата
cjhopman@chromium.org 9a5e20f44c [Android][Reland] Extract signing+zipaligning to python
Continued de-antification. This one is pretty straightforward.

Landed in https://chromiumcodereview.appspot.com/13427020
Reverted in https://codereview.chromium.org/13866023/

TBR=yfriedman@chromium.org
BUG=158821

Review URL: https://chromiumcodereview.appspot.com/13861023

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193238 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-09 22:22:15 +00:00
viettrungluu@chromium.org feef0f12c7 Revert 193160 "[Android] Extract signing+zipaligning to python"
> [Android] Extract signing+zipaligning to python
> 
> Continued de-antification. This one is pretty straightforward.
> 
> BUG=158821
> 
> 
> Review URL: https://chromiumcodereview.appspot.com/13427020

TBR=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/13866023

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193182 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-09 19:50:12 +00:00
cjhopman@chromium.org 6c1656d8d8 [Android] Extract signing+zipaligning to python
Continued de-antification. This one is pretty straightforward.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13427020

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193160 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-09 18:39:03 +00:00
cjhopman@chromium.org f5ba848b4d Use java_apk.gypi for gtest apks
Currently, normal APKs and instrumentation APKs are both built using
java_apk.gypi (which includes all kinds of new hotness). Native
unittest APKs, though use apk_test.gypi and thus the complicated
native_test_apk.xml and Android's Ant build.xml. That is bad.

This change updates apk_test.gypi to include java_apk.gypi and so
brings these two ways of building APKs into alignment. It also very
slightly updates the configurability of java_apk.gypi and
apk-package.xml.

There are still a couple of targets in WebKit that use
generate_native_test.py and native_test_apk.xml directly that need to
be updated to use apk_test.gypi before those two scripts can be
simplified/removed.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13564003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192662 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-06 00:14:39 +00:00
cjhopman@chromium.org 0ed4367af2 Package correct libraries in apk
With gyp_managed_install no shared libraries should be packaged in the
APK (except gdbserver).

When toggling gyp_managed_install, there may be left over libraries in
<(intermediate_dir)/libs. APK packaging should use a different
directory when doing a managed install, so that it does not include the
library from a non-gyp_managed_install build.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13651003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192617 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 19:55:07 +00:00
cjhopman@chromium.org eca42680e4 Add input md5 check to create_device_library_links.py
The md5 stamp path includes the device serial (i.e. the stamp is
library-device specific).

Also, this no longer creates a shell for-loop as the command to send to
adb. adb shell has a ~1000 character limit for commands, and the
for-loop was exceeding that limit. Now that we only create links for
libraries that actually have changed, there is not as much benefit to
creating all the links in one adb command.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13537006

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192484 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 03:51:51 +00:00
cjhopman@chromium.org 196ded54dc Suppress Ant build noise
Use a simple wrapper script for calling ant. This allows us to suppress the
"BUILD SUCCESSFUL" + timing output from ant.

BUG=164395


Review URL: https://chromiumcodereview.appspot.com/13470026

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192478 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-05 03:41:57 +00:00
cjhopman@chromium.org 05938fc5f8 CheckCallDie: add option to suppress successful output
Some commands that are called by build scripts are particularly verbose
(ant, dex, readelf). For these commands, the output (when successful)
is not useful (unlike javac, for example). Add an option
(suppress_output) to build_util.CheckCallDie to disable printing of
stdout/stderr when the call is successful.

Also, move remaining build scripts in build/android to
build/android/gyp.

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13473017

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192409 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-04 23:04:40 +00:00
cjhopman@chromium.org 5684a94e39 Add input content checking to some build scripts
Some build steps, particularly javac, have really loose input rules.
I.e. javac steps are re-built when any input jar changes. Often, this
leads to unnecessary rebuilds of all the following steps.

Other build tools (ninja, goma), will check the contents of the inputs
to a step, and if those inputs haven't changed that tool doesn't
actually re-run the command for creating the output.

This change brings that same benefit to some of the Android python
build scripts. Particularly those that will save a significant amount
of time by adding input content checks.

The checking checks both the input files and the command that will be
run. It compares this against a stored md5 digest. If it has not
changed, then the output does not need to be recreated (though it is
still touched to trigger following steps).

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13432002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192265 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-04 09:35:50 +00:00
yfriedman@chromium.org 10e1939a6b [Android] "Namespace" shared libraries for the component build
With the component build, we tell Dalvik to load each library separately by name. Some of our library names conflict with android shared libraries resulting our library not getting loaded. When building for components on Android, change the suffix of libraries to "cr.so" e.g. libnetcr.so to avoid colliding with Android's copies

BUG=158821

Review URL: https://chromiumcodereview.appspot.com/13549002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192258 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-04 09:15:59 +00:00
cjhopman@chromium.org 561e3ec42e Make write_library_dependencies.py find all transitive dependencies
For the component build, it is impractical/impossible to explicitly
list all library dependencies. This list is required (in dependency
order) for several of the apk-building steps.

For now, we will generate this list as follows:
Use readelf to find all transitive dependencies
Topologically sort those dependencies

Once we can expose this information from gyp
(http://crbug.com/2255588), it is straightforward to update this action
to use the gyp-exposed list of libraries.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13261024

git-svn-id: http://src.chromium.org/svn/trunk/src/build@192103 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-03 18:20:22 +00:00
cjhopman@chromium.org 6bcaee7278 Push native libraries separately when gyp manages install
When an APK is installed, any native libraries it contains are
extracted to the APK's lib folder on the device. It is actually
possible to add, change, or remove libraries in that folder directly.

This means, that when gyp is managing the install of APKs, the APK does
not actually need to include the native library, and that can be pushed
separately.

This does several nice things:
libraries can be pushed while a .apk is building
.apk no longer needs to be rebuilt+reinstalled when a library changes
if native library isn't changed, it doesn't need to be zipped+installed
w/ component build, only changed libraries will need to be reinstalled

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13334003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191888 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-02 20:36:13 +00:00
cjhopman@chromium.org 4151593374 Allow the build to install apks
Add a gyp variable "android_managed_install" which defaults to off/0.
When this variable is 1, building an apk target will install that
target.

This will allow us to do crazy things with the install like pushing
native libraries independent from the apk they belong to.

This currently just does an "adb install -r <(apk_path)". I.e. it only
works for (the typical) single device attached workflow. This could
be made configurable to handle other cases (or maybe just install to all
devices attached, or just to the first device).

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13269002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191840 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-02 16:55:46 +00:00
jayjang@chromium.org 867afcbe90 Support multiple proguard flags from java_apk.gypi. Proguard supports multiple proguard configuration files but java_apk and apk-build.xml supports only one proguard configuration.
BUG=181470


Review URL: https://chromiumcodereview.appspot.com/12913017

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191806 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-02 09:10:54 +00:00
cjhopman@chromium.org dacd1ae54c Convert native strip from rule to action
First, this allows us to correctly have the output of the copy/strip
action be an input to the apk package action.

Second, this step now uses the list of libraries created by ordered
libraries step. This is required to support the component build where
we can not manually list the required libraries.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/13058003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191754 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-02 03:23:14 +00:00
yfriedman@chromium.org c69e0c3a8c [Android] Make build output a little quieter.
Suppress warnings from jsr305 by only enabling some warnings for chromium_code.
Also fixes the fact that components code wasn't setting chromium_code


Review URL: https://chromiumcodereview.appspot.com/12702017

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191706 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-01 23:52:40 +00:00
cjhopman@chromium.org d13f9eb51a Make the build control what library(/ies) to load
At build time, we know what native libraries an apk needs to load.
Instead of requiring those .apks to specify this again in code, instead
generate a .java file containing a list of the libraries to load.

This is done using a pattern similar to resources, content_java is built
with a placeholder NativeLibraries.java (i.e. without an actual value
for its libraries list). The corresponding .class file is not included
in content_java.jar. Then, when building an apk we generate the "real"
NativeLibraries.java (with the real String[]) and include that in the
.apk.

This is designed to also support the component build, where, we will
have to calculate the list of libraries at build time, and sort them in
dependency order (because Android's linker, for some reason, doesn't do
that itself).

BUG=158821
TBR=brettw@chromium.org

Review URL: https://chromiumcodereview.appspot.com/12939021

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191695 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-01 23:12:33 +00:00
jayjang@chromium.org eb4ceea694 Fix proguard enabled condition in dexing step. By definition proguard_enabled flag should use "true" and "false" value instead of 1. Also dexing step should take into account "obfuscating" step which is turned on Release mode only.
BUG=


Review URL: https://chromiumcodereview.appspot.com/13145006

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191362 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-29 16:12:42 +00:00
cjhopman@chromium.org 9c95da8d41 Predex java libraries
dx supports merging of already dexed jars. This means we
can dex jars as part of the library target and then just
merge them when we build the apk.

BUG=158821


Review URL: https://chromiumcodereview.appspot.com/12913009

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191063 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-27 23:31:27 +00:00
mkosiba@chromium.org 467f42371f Fix the Android.mk gyp backend.
Add missing quotes to the expansion in java.gypi such that the shell
doesn't try to expand make variables.

BUG=None
TEST=run android_webview/tools/gyp_webview
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/13044007

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190917 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-27 12:25:00 +00:00
cjhopman@chromium.org 83d2ed66a8 Fix proguard
Proguard should only be run in Release mode (in gyp, proguard_enabled is
not set based on the configuration). This is the way that we had
been determining whether or not to run proguard before recent Ant
refactoring.

Also, proguard needs the path to the android.jar


BUG=224079


Review URL: https://chromiumcodereview.appspot.com/12922004

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190876 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-27 09:04:27 +00:00
cjhopman@chromium.org d63e35e839 Translate some ant to python
This moves java compilation, jar, and dex for apks from
ant to python. This uses the same javac.py and jar.py
that are used by build/java.gypi for libraries and introduces a simple dex.py.


BUG=158821


Review URL: https://chromiumcodereview.appspot.com/12880007

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190756 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-26 20:44:29 +00:00
cjhopman@chromium.org bf2791cc95 Split apk-build.xml into 3 steps
In preparation for rewriting these actions in python, split apk-build.xml into smaller ant scripts. This should not change the functionality and mostly is just splitting the file and identifying the properties and defines required for each of the new files.

Some of the configuration is moved out of ant and into gyp (i.e. the android_manifest_path is now gyp-configurable).

Also, the ant scripts now use the correct basedir! That is, these ant scripts actually understand relative paths. To go along with this, resource_dir is the relative path to the resource directory (rather than a path relative to java_in_dir).

BUG=158821
TBR=torne@chromium.org, brettw@chromium.org
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/12963009

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190712 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-26 17:35:21 +00:00
newt@chromium.org 87b2b696dc Generate Android string files from generated_resources.grd.
This enables Android layouts and Java code to use strings from
generated_resources.grd directly.  Strings tagged with
formatter_data="android_java" in generated_resources.grd are used to produce an
Android strings xml file.

BUG=176069


Review URL: https://chromiumcodereview.appspot.com/12529025

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190573 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-26 07:31:57 +00:00
jayjang@chromium.org 06727a213d Make manifestmerge.enabled configurable from java_apk.gypi In order to put activity or service AndroidManifest.xml by flag we need to be able to set "manifestmerge.enabled=true" from gyp file. This is required to put googletv specific activity and services
BUG=181470


Review URL: https://chromiumcodereview.appspot.com/12450013

git-svn-id: http://src.chromium.org/svn/trunk/src/build@189115 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-19 21:40:39 +00:00
cjhopman@chromium.org 00cec5be32 This is the first change in simplifying our ant build scripts.
First check in a copy of 
third_party/android_tools/sdk/tools/ant/build.xml as 
build/android/ant/apk-build.xml

Previously we were overriding targets from this build.xml
in build/android/ant/sdk-targets.xml. Instead of doing this
override, just replace the actual targets in apk-build.xml.

Do the same for properties that we were overriding in 
build/android/ant/chromium-apk.xml.

Both of these have no logical change on these build scripts. 
Ant's targets and properties are immutable and so Ant was
doing this exact thing already.


BUG=158821


Review URL: https://chromiumcodereview.appspot.com/12599005

git-svn-id: http://src.chromium.org/svn/trunk/src/build@187483 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-12 03:58:06 +00:00
cjhopman@chromium.org 0dc4b9a2a6 Move shared lib stripping to python
This is a pretty simple translation of the library stripping into
python. With the component build, this step will become a bit more
complex, and so I'd much rather it be in python than shell script.


BUG=158821


Review URL: https://chromiumcodereview.appspot.com/12330112

git-svn-id: http://src.chromium.org/svn/trunk/src/build@186735 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-07 17:39:22 +00:00
newt@chromium.org ad28e0b4ee Temporary fix for build break when removing Java files or resources.
This appends the list of inputs to the ant and process_resources.py
commands. Thus when the list of inputs changes, the command line
changes, and ninja will re-run the command.

This will be removed once ninja is updated to automatically rebuild
when the input list changes.

BUG=177449,177552


Review URL: https://chromiumcodereview.appspot.com/12379066

git-svn-id: http://src.chromium.org/svn/trunk/src/build@186299 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-06 00:36:41 +00:00
cjhopman@chromium.org ba119ddda2 Use _target_name instead of package_name for java*.gypi
We were using package_name as a unique name for naming output files and
directories. package_name was typically the same as _target_name or a
variation of it (like dropping _apk). Using _target_name instead means
we need to specify one less thing and it is (maybe?) guaranteed to be
unique.

TBR=brettw,joi,jar,fischman,zea,sky
BUG=

Review URL: https://chromiumcodereview.appspot.com/11308030

git-svn-id: http://src.chromium.org/svn/trunk/src/build@183639 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-20 22:39:17 +00:00
nileshagrawal@chromium.org 4e7a52f05b Relanding "Add apk for running content_browsertests"
Revert "Revert 179189"

This reverts commit 5844ab0c6a41cc9d306f8c355cc7ceb5e290cbb1.

Original CL:https://codereview.chromium.org/12047068/
was reverted as we failed to update the bot scripts with the new package
name for content_shell_apk

TBR=mark@chromium.org,jam@chromium.org
BUG=138275


Review URL: https://chromiumcodereview.appspot.com/12091033

git-svn-id: http://src.chromium.org/svn/trunk/src/build@179428 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-29 21:55:55 +00:00
nileshagrawal@chromium.org 301f139360 Revert 179189
Failed to rename package name in buildbot scripts. Broke buildbots.

> Add apk for running content_browsertests
>     
> Split off org.chromium.content_shell into:
>       org.chromium.content_shell - content shell java code, builds a jar, directory structure similar to other jar targets
>       org.chromium.content_shell_apk - application code to build content_shell_apk, directory structure similar to that of android application
>       org.chromium.content_browsertests_apk - application code to build content_browsertests_apk
> 
> Also splitting content/shell/android/res into:
>   - content/shell/android/java/res 
>   - content/shell/android/shell_apk/res
> 
> Both content_shell_apk and content_browsertests_apk will depend on content_shell_java target to include java/res needed to show a shell based browser.
>     
> I will do another CL to move The java files for content_shell_tests_apk to content_shell_apk package.
>     
> BUG=138275
> 
> 
> Review URL: https://chromiumcodereview.appspot.com/12047068

TBR=nileshagrawal@chromium.org
Review URL: https://codereview.chromium.org/12088031

git-svn-id: http://src.chromium.org/svn/trunk/src/build@179211 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-28 23:20:06 +00:00
nileshagrawal@chromium.org 5071c38e81 Add apk for running content_browsertests
Split off org.chromium.content_shell into:
      org.chromium.content_shell - content shell java code, builds a jar, directory structure similar to other jar targets
      org.chromium.content_shell_apk - application code to build content_shell_apk, directory structure similar to that of android application
      org.chromium.content_browsertests_apk - application code to build content_browsertests_apk

Also splitting content/shell/android/res into:
  - content/shell/android/java/res 
  - content/shell/android/shell_apk/res

Both content_shell_apk and content_browsertests_apk will depend on content_shell_java target to include java/res needed to show a shell based browser.
    
I will do another CL to move The java files for content_shell_tests_apk to content_shell_apk package.
    
BUG=138275


Review URL: https://chromiumcodereview.appspot.com/12047068

git-svn-id: http://src.chromium.org/svn/trunk/src/build@179189 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-28 21:21:00 +00:00
newt@chromium.org e565093c2f Re-land "[Android] Generate localized strings.xml files at build time."
This generates localized strings.xml files (e.g.
values-fr/strings.xml) from grd and xtb files at build time. This
means we no longer need to check in localized strings.xml files. Note:
the xtb files are empty until translations are available.

Benefits:
 - 41 fewer extraneous results when grepping Java string IDs
 - Switching from maintaining strings in strings.xml over to using a
   grd file is One Trivial CL* away: just include English in the list
   of languages for which we generate strings.xml files.

*Restrictions may apply

Originally landed as https://codereview.chromium.org/11659006/
This can be re-landed as of https://codereview.chromium.org/11880050/

BUG=167248
TBR=yfriedman@chromium.org,thakis,jam@chromium.org,cjhopman,shashishekhar@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@177170 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-16 17:54:42 +00:00
yfriedman@chromium.org 8af4ad7f96 [Android] Remove some unneeded gyp defines.
These are crufy and not needed anymore. A follow-up will start pushing used defines into gyp.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-15 21:13:32 +00:00
yfriedman@chromium.org 731dfc09b1 Revert 176198
Fixed permissions on build/android/envsetup.sh

> Revert 176176
> > Update Android build to API level 17 and SDK Tools version 21
> > 
> > Some fixes included:
> > - Changes to resource management to account for new R.java packaging
> >   from library projects
> >   (https://android-review.googlesource.com/#/c/43134/).
> > - Fixed the package for some inludes in ModalDialogTest.java. This only
> >   worked because of how we previously used to aggregate all resoures
> >   from the prior layer. With the new packaging, we must use the resource
> >   from the appropriate layer.
> > 
> > BUG=163001,166434
> > NOTRY=true
> > 
> > Review URL: https://chromiumcodereview.appspot.com/11819047
> 
> TBR=yfriedman@chromium.org
> Review URL: https://codereview.chromium.org/11783108

TBR=smckay@chromium.org
Review URL: https://codereview.chromium.org/11820065

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176202 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 23:33:38 +00:00
smckay@chromium.org e573012f0f Revert 176176
> Update Android build to API level 17 and SDK Tools version 21
> 
> Some fixes included:
> - Changes to resource management to account for new R.java packaging
>   from library projects
>   (https://android-review.googlesource.com/#/c/43134/).
> - Fixed the package for some inludes in ModalDialogTest.java. This only
>   worked because of how we previously used to aggregate all resoures
>   from the prior layer. With the new packaging, we must use the resource
>   from the appropriate layer.
> 
> BUG=163001,166434
> NOTRY=true
> 
> Review URL: https://chromiumcodereview.appspot.com/11819047

TBR=yfriedman@chromium.org
Review URL: https://codereview.chromium.org/11783108

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176198 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 23:18:11 +00:00
yfriedman@chromium.org 7720827607 Update Android build to API level 17 and SDK Tools version 21
Some fixes included:
- Changes to resource management to account for new R.java packaging
  from library projects
  (https://android-review.googlesource.com/#/c/43134/).
- Fixed the package for some inludes in ModalDialogTest.java. This only
  worked because of how we previously used to aggregate all resoures
  from the prior layer. With the new packaging, we must use the resource
  from the appropriate layer.

BUG=163001,166434
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11819047

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176176 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 22:27:17 +00:00
newt@chromium.org 8b3ac4b321 Revert 176134
> [Android] Generate localized strings.xml files at build time.
> 
> This generates localized strings.xml files (e.g.
> values-fr/strings.xml) from grd and xtb files at build time. This
> means we no longer need to check in localized strings.xml files. Note:
> the xtb files are empty until translations are available.
> 
> Benefits:
>  - 41 fewer extraneous results when grepping Java string IDs
>  - Switching from maintaining strings in strings.xml over to using a
>    grd file is One Trivial CL* away: just include English in the list
>    of languages for which we generate strings.xml files.
> 
> *Restrictions may apply
> 
> BUG=167248
> 
> Review URL: https://codereview.chromium.org/11659006

TBR=newt@chromium.org
Review URL: https://codereview.chromium.org/11820058

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176151 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 21:05:48 +00:00
newt@chromium.org 7c4ca3e243 [Android] Generate localized strings.xml files at build time.
This generates localized strings.xml files (e.g.
values-fr/strings.xml) from grd and xtb files at build time. This
means we no longer need to check in localized strings.xml files. Note:
the xtb files are empty until translations are available.

Benefits:
 - 41 fewer extraneous results when grepping Java string IDs
 - Switching from maintaining strings in strings.xml over to using a
   grd file is One Trivial CL* away: just include English in the list
   of languages for which we generate strings.xml files.

*Restrictions may apply

BUG=167248

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@176134 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-01-10 20:02:26 +00:00
yfriedman@chromium.org c5949d2c12 Reduce verbosity of Android builds.
There's a lot of boilerplate from running ant. Passing '-q' silences most of it.

BUG=164395
NOTRY=True

Review URL: https://chromiumcodereview.appspot.com/11606010

git-svn-id: http://src.chromium.org/svn/trunk/src/build@173688 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-12-18 07:54:35 +00:00
shashishekhar@chromium.org ec5d4b16f2 Add gyp dependency on proguard flags.
Apks currently are not rebuilt when proguard flags change, add
gyp dependency on proguard flags.


Review URL: https://chromiumcodereview.appspot.com/11419249

git-svn-id: http://src.chromium.org/svn/trunk/src/build@170820 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-12-03 22:08:33 +00:00
newt@chromium.org d82a0d737e Enable Android APKs to be build with R.java in a custom package.
BUG=158558


Review URL: https://chromiumcodereview.appspot.com/11411049

git-svn-id: http://src.chromium.org/svn/trunk/src/build@168704 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-20 02:17:23 +00:00
newt@chromium.org 986e331cb8 Support Java resources within content.
This provides support for android-style resource folders in content and other
non-apk Java targets. The AppResource hack can then be removed shortly.

Details: while building a non-apk target (e.g. chromium_content.jar), we
generate an R.java file with non-final constants and in the appropriate Java
package (e.g. org.chromium.content.R) using the resources in the target (e.g.
content/public/android/java/res). This R.java is used to produce the jar, but is
not included in the jar itself.

When we later build an apk, we merge the resources from the apk (e.g.
org/chromium/content_shell/res) with the resources from the non-apk targets it
depends on (e.g. content/public/android/java/res). A new R.java is generated
using the merged resources with the correct mapping from resources to integer
IDs. This R.java file is copied into each needed package (e.g.
org.chromium.content.R and org.chromium.content_shell.R) and included in the
apk.

This is the first of three CLs to replace AppResource with R:
1. http://codereview.chromium.org/11363150 - Support Java resources within content
2. http://codereview.chromium.org/11360207 - Add Java resources to content and chrome
3. http://codereview.chromium.org/11377117 - Remove AppResource and unneeded resources

BUG=136704

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@168283 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-16 20:39:20 +00:00
cjhopman@chromium.org e75eedd6de Specify jar name for apks in java_apk.gypi
Previously, we had to keep this name in sync in multiple places, the
"fake" xxx_java target and in sdk-targets.xml. Instead, it should be set
only in java_apk.gypi and then passed along to each of the places that
we were specifying it before.

Also, delete unused 'output' block and unneeded xxx_java dependencies.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11363131

git-svn-id: http://src.chromium.org/svn/trunk/src/build@168148 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-16 07:31:49 +00:00
cjhopman@chromium.org aff218abd9 Remove unneeded symbolic link to libraries.
The stack annotation tool has been changed to work with Chrome output
directory structure and so we no longer need to create the artificial
structure in out/android.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11368102

git-svn-id: http://src.chromium.org/svn/trunk/src/build@166423 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-07 15:08:01 +00:00
shashishekhar@chromium.org 51f63436a8 Remove -debug suffix in apk names.
-debug suffix is used even for Release builds, remove this suffix
now apk name will have no suffix in either Debug or Release builds.

BUG=155946


Review URL: https://chromiumcodereview.appspot.com/11221003

git-svn-id: http://src.chromium.org/svn/trunk/src/build@162803 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-18 21:52:16 +00:00
shashishekhar@chromium.org 91d3f56957 Make resource directory option in gyp template optional.
Resource directory may not always be defined for an apk, make it optional.

BUG=156061

Review URL: https://chromiumcodereview.appspot.com/11189010

git-svn-id: http://src.chromium.org/svn/trunk/src/build@162477 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-17 19:07:14 +00:00
cjhopman@chromium.org cac2cd5439 Move shared library copy and strip to java_apk.gypi
Also, for each such shared library included in an apk, create a link in
the appropriate directory in <(android_product_out) to enable annotating
native stack traces for those apks.

BUG=


Review URL: https://chromiumcodereview.appspot.com/11096038

git-svn-id: http://src.chromium.org/svn/trunk/src/build@161440 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-11 23:23:49 +00:00
shashishekhar@chromium.org 08b182227f Add Proguard option to gyp template.
Add proguard specific options to java_apk.gypi so that an apk can
specify proguard flags.

BUG=149214


Review URL: https://chromiumcodereview.appspot.com/11100002

git-svn-id: http://src.chromium.org/svn/trunk/src/build@161004 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-10 01:29:46 +00:00
yfriedman@chromium.org 0a943a3e73 Fix chromium testshell crash on startup.
After http://codereview.chromium.org/10876056/, we need to include chrome's pak files in testshell.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@160958 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-10-09 22:40:39 +00:00