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

67 Коммитов

Автор SHA1 Сообщение Дата
thakis@chromium.org 3dc0e500a2 android: Remove last two md5sum calls from gyp files.
Use the timestamp of a filelist instead of the md5sum call. No intended
behavior change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258455 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-20 23:22:44 +00:00
thakis@chromium.org f75e747b56 android: Pass list of java files as command line, instead of through a file list.
There aren't that many java files, so this should be well below the command
length file system limit. (Checked with `find. -name '*.java' | wc`).

No intended behavior change.

BUG=177552
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@257467 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-17 18:23:12 +00:00
thakis@chromium.org 7fb057757c android: Remove last md5sum call from java.gypi.
process_resources writes all inputs to a filelist, and then passes the md5sum
of the filelist as parameter (so that the commandline changes when inputs are
removed, causing a rerun).

Instead, just make the input filelist another input. gyp writes filelists when
their contents change, so this means if inputs are removed, the mtime of the
filelist will change, also causing a rebuild.

No intended behavior change.

BUG=177552
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@257464 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-17 17:59:47 +00:00
thakis@chromium.org 0231df62e1 android: Make javac rules depend on java files too.
Fixes regression from r256667, which made javac only rerun when the list of
java files changed, not when a java file itself was touched :-/

BUG=177552
TEST=touch java file, rebuild. apk gets updated.
R=miguelg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256842 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 15:47:16 +00:00
thakis@chromium.org 29f3cd4289 android: Remove three unnecessary md5sum calls.
After r256667, the list of java files for javac is written into a gyp
filelist, which gets rewritten if a java file is removed. (If a generated
java file is removed, that still doesn't cause a rebuild, but that didn't
happen before this CL either, http://crbug.com/) This allows removing the
md5sum call for javac in java_apk.gypi.

java.gypi also has additional_input_paths as input, but that's only used
for stamp files, for ordering purposes, so it's not necessary to re-run
the javac action if a stamp file disappears from additional_input_paths.

With the same reasoning, the md5sum call in 'ant package resources' is not
needed: additional_input_paths is the only non-stamp input that isn't also
on the command line. ('ant package resources' is missing some inputs, but
that's independent of this change: http://crbug.com/351928)

No behavior change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-13 04:48:10 +00:00
thakis@chromium.org cd848af573 android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)

After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.

This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.

(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)

No intended behavior change.

BUG=177552
R=cjhopman@chromium.org

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

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256667 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-12 21:56:41 +00:00
thakis@chromium.org 2a9c872123 Revert 256097 "android: Pass (non-generated) .java files via a g..."
Breaks target device_extras_apk on the upstream bot, due to the src/ issue
mentioned on the review: A java target contains another java target in a
subdirectory, and due to the missing src/ the java files in the subtarget
get picked up twice.

> android: Pass (non-generated) .java files via a gyp filelist to javac.py
> 
> Before this CL, the javac action rules called `find javadir -name "*.java"` to
> compute the action's inputs, and passed javadir to javac.py. The script then
> again looked for all .java files in that directory. One issue with that approach
> is that if a java file gets removed, the javac.py action didn't get executed again
> since actions are only run if their commandline changes or an input file is newer
> than an output file – a disappearing input doesn't mark an action dirty. (As
> workaround, the md5 hash of all .java files is currently passed in an
> --ignore parameter, so removal of a java file will lead to a changing
> commandline, which _will_ cause a rebuild.)
> 
> After this CL, the result of `find javadir -name "*.java"` is written to a gyp
> filelist (see https://codereview.chromium.org/27418008/), and the filelist
> is passed to javac.py. gyp writes filelists exactly if their contents would
> change, so removal of java file will change the mtime of the filelist, which will
> cause a rebuild. Another advantage is that the list of java files is computed in
> only one place.
> 
> This CL doesn't yet remove the md5 hack, but it makes it possible to do so
> in a follow-up change.
> 
> (This approach doesn't work for generated java files, because these might
> not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
> use for generated files. The dependency handling of generated java files is
> done through stamp files, so the md5 hack isn't needed for them.)
> 
> No intended behavior change.
> 
> BUG=177552
> R=cjhopman@chromium.org
> 
> Review URL: https://codereview.chromium.org/193693002

TBR=thakis@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256127 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-11 04:29:51 +00:00
thakis@chromium.org 94d601435c android: Pass (non-generated) .java files via a gyp filelist to javac.py
Before this CL, the javac action rules called `find javadir -name "*.java"` to
compute the action's inputs, and passed javadir to javac.py. The script then
again looked for all .java files in that directory. One issue with that approach
is that if a java file gets removed, the javac.py action didn't get executed again
since actions are only run if their commandline changes or an input file is newer
than an output file – a disappearing input doesn't mark an action dirty. (As
workaround, the md5 hash of all .java files is currently passed in an
--ignore parameter, so removal of a java file will lead to a changing
commandline, which _will_ cause a rebuild.)

After this CL, the result of `find javadir -name "*.java"` is written to a gyp
filelist (see https://codereview.chromium.org/27418008/), and the filelist
is passed to javac.py. gyp writes filelists exactly if their contents would
change, so removal of java file will change the mtime of the filelist, which will
cause a rebuild. Another advantage is that the list of java files is computed in
only one place.

This CL doesn't yet remove the md5 hack, but it makes it possible to do so
in a follow-up change.

(This approach doesn't work for generated java files, because these might
not yet exist at gyp time. Rename --src-dirs to --src-gendirs and keep it in
use for generated files. The dependency handling of generated java files is
done through stamp files, so the md5 hack isn't needed for them.)

No intended behavior change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256097 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-11 02:16:36 +00:00
thakis@chromium.org be90298723 android: Remove unneeded md5sum class for jar.py and jar_toc.py.
Both actions have a small fixed list of inputs. md5sum is only needed for
variable input lists (see bug). No behavior change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255436 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 21:41:00 +00:00
thakis@chromium.org d4c5dfb682 android: Remove a few unnecessary md5sum invocations.
When the list of implicit inputs of a build edge shrinks, ninja doesn't
rerun it.  The Android build uses complex build actions (e.g. ant) whose
output depend on directory contents and whatnot, and the Android build
by adding "dir/*.java" or similar as implicit inputs.  So it's important
that ninja does rerun these actions when their list of implicit inputs
shrinks.  As a workaround, the Android build passes the md5 of the list of
implicit inputs as "--ignored" parameter to the build action (ninja does
rerun edges whose commandline changes.)

Due to copypasta, this --ignored flag is used in a few places where it's
not actually used (on edges where all inputs are already passed as regular
commandline parameters).

Also remove the --ignored parameter from proguard.py as nothing passes it
any more.

BUG=177552
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@254414 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-02 20:22:16 +00:00
newt@chromium.org 02ad65b2bc Revert of https://codereview.chromium.org/106173002/
Reason for revert: this introduced a package dependency bug where ia32-libs cannot be installed on ubuntu precise systems

TBR=kkimlabs@chromium.org,cjhopman@chromium.org,pschmidt@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=290225

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@243437 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-08 00:05:19 +00:00
newt@chromium.org 0aab148f04 Mirror images for RTL languages at build time.
This adds a build step to generate mirrored images for use in
right-to-left (RTL) languages. Images are mirrored by flipping the
original image over the vertical axis. Every image must be explicitly
listed as mirrorable or non-mirrorable in a config file.

The goal: ensure that our RTL image assets are always up-to-date.

BUG=290225
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@243332 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-07 18:02:29 +00:00
frankf@chromium.org 09d44ed138 [Android] Add lint as a gyp action.
- Run lint on all java/apk targets using a dummy AndroidManifest.xml
- Add build/android/lint/suppress.py for suppressing generated
  errors
- Enable lint on FYI builders as a first step

BUG=None
R=cjhopman@chromium.org, newt@chromium.org
TBR=navabi@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@239984 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-12-11 03:02:10 +00:00
gkanwar@chromium.org c9cd51e763 Adds ability to exclude java libraries
NOTRY=True
BUG=278365

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@219409 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-24 03:25:14 +00:00
gkanwar@chromium.org 952d5c5a00 Makes GYP changes for EMMA coverage
One piece of the overall java coverage change.
See: https://codereview.chromium.org/20210002/

NOTRY=True
BUG=255644

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@218870 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-22 00:08:31 +00:00
cjhopman@chromium.org 819b1a6f40 Add support for proguard preprocessing.
* Adds support for running proguard on our libraries
before they are added to the final release APK.
* Start using the proguard preprocessing for
third_party/guava.

BUG=272790
NOTRY=true
TBR=darin@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@217706 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-15 00:12:07 +00:00
avayvod@chromium.org 91eb9e02ae Avoid too long command lines.
The hash is calculated for the list of the resource files to determine if the
files were changed (added, removed, renamed, etc). The current way of doing it
may explode the command line length over the system limit. To avoid it, the list
of the input files is written to a temporary file on disk and the file is used
to calculate the checksum.

BUG=177552
R=cjhopman@chromium.org, newt@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@213849 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-26 11:45:06 +00:00
andrewhayden@chromium.org 32b9b58543 Fix minor typo in java.gypi that could cause extra build work.
BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@212163 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-17 23:15:57 +00:00
kkimlabs@chromium.org 19333597df [Android] Add an gyp option to disable generating v14 resources script.
Currently, we are generating v14 layout and style resources from v17
resources by replacing Start and End attributes to Left and Right
attributes. However, it is not necessary for all cases, so make an
option to disable generate_v14_compatible_resources.py script and
only verify that there is no RTL attributes in the pre-v17 resources.

BUG=247049

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@210555 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-09 14:07:51 +00:00
cjhopman@chromium.org 1753c2d759 [Android] Fix proguard
Gyp supports only very limited ways of changing behavior based upon
CONFIGURATION_NAME. Particularly, it does not support the way that was
supposed to enable/disable use of proguard.

Instead of trying to switch behavior in gyp, instead pass
CONFIGURATION_NAME, proguard_enabled, and
proguard_enabled_dex_input_path to dex.py and switch the behavior
there.

This also extracts the dex actions into build/android/dex_action.gypi
and uses that for the actions in both build/java.gypi and
build/java_apk.gypi.

BUG=240837

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@200958 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-18 02:33:37 +00:00
kkimlabs@chromium.org 557496ab19 [Android] Auto-generate only necessary v14 resources.
V14 Resource auto-generation was introduced by crbug.com/235118.
However, some resources doesn't use v17 attributes, so we don't
need to generate for all resources.

BUG=239742

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@199564 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-10 23:11:34 +00:00
kkimlabs@chromium.org 8c5a209101 [Android] Auto-generate RTL layout xmls from existing layout xmls.
There are several attributes introduced in API 17, mostly for BiDi(RTL) support, e.g., paddingStart.
    This build script will generate another set of resource that is API 14 compatible by
    converting those API 17 attributes to API 14 attributes, e.g., paddingStart -> paddingLeft.
    The goal of this script is for programmers to use those attributes without worrying
    about backward-compatibility care and related bugs. About the bugs, please refer to crbug.com/235118 .
    
    BUG=235118

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@198325 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-04 15:47:16 +00:00
cjhopman@chromium.org fe471aa1f9 [Android] Create and use .TOC files for jars
The native component build creates .TOC files for each of the native
libraries. These files contain the compile-time visible API of the
corresponding library. That is, if something changes in the native
library that could have an effect on linking of dependent libraries,
then that change will be reflected in the .TOC file. Then, these .TOC
files can be used to determine if linking of dependents is required.

This change brings that same magic to Java.

When building a .jar, we also create a .jar.TOC that includes the
signatures for public/protected classes/functions/variables (including
the values for constants since they can be inlined dependents).

When compiling a Java library, use an Md5Checker over the .java files
and the classpaths .jar.TOC (using the .jar if the .TOC isn't available
as is currently the case for prebuilt jars).

BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@194080 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-13 02:49:36 +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
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
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
boliu@chromium.org 3c06aaefc7 Fix downstream Android WebView build
Quote the expansion in java.gypi such that the shell doesn't try to
expand make variables. Similar to fix in r188760

NOTRY=true

BUG=


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@191359 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-29 15:51:39 +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
newt@chromium.org 8b63827d56 [Android] Allow Java libraries to access resources from dependencies.
Libraries could previously access dependencies' resources in Java code
but not in XML layout files. This enables accessing these resources in
layout files as well, with the compromise that resources can now be
accessed using the wrong package name in Java code. Since resource
names are global anyway (an APK can't contain two resources with the
same name), this is deemed OK.

BUG=176069


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190896 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-27 09:48:03 +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
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
cjhopman@chromium.org 5496f2e09a Make process_resources.py more configurable
This allows more configuration of the aapt call from within gyp. This is primarily to support differences that are required to use process_resources.py for java_apk.gypi.


BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@190055 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-23 18:38:32 +00:00
torne@chromium.org 5225fc6f93 Android WebView: actually fix the sdk jar problem.
r188747 didn't actually fix the webview build problem (though it's still
a useful refactoring) - the right fix is just to add quotes to the
expansion in java.gypi such that the shell doesn't try to expand make
variables.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@188760 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-18 17:23:18 +00:00
torne@chromium.org ec96cb94c8 Android: factor out use of SDK jar.
Specify the path to the Android SDK main jarfile in a single location so
that it can be overridden by the WebView build.

BUG=
TBR=fischman@chromium.org,brettw@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@188737 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-18 15:05:04 +00:00
cjhopman@chromium.org c10677b0ce Convert java library javac/jar to python
This is a fairly straightforward translation of the ant build script
into two python actions.

Two things have been moved into the gyp file: adding android.jar to the
classpath and specifying the jar_excludes (currently just R.class and
R$*.class).

BUG=158821


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@188594 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-03-16 16:25: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
newt@chromium.org 21542f3b68 Maintain Android strings in grd files.
This removes the Android/Java strings.xml files, which are now
generated at build time from grd files. New strings should now be
added to the grd files.

BUG=167248


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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@185218 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-02-28 11:05:57 +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
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 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
newt@chromium.org 7d00b4310a [Android] Add process_resources.py to build Android library resources.
This generates the copy of R.java used to compile the library jar (formerly
done in gyp) and adds a new step to crunch image resources.

The imaging crunching step fixes the link preview 9-patch drawing artifact,
among other benefits.

BUG=163602

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@172655 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-12-12 21:01:08 +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
nyquist@chromium.org 0e337943da Add support for generating jars from protos and add cacheinvalidation_java.
The cacheinvalidation_java target is also added to build/all_android.gyp to
ensure it is always built since nothing currently depends on it upstream.
When all of Android-specific sync code is upstreamed, a target for sync
should be used instead of cacheinvalidation.

BUG=158382

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@167746 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-14 21:20:47 +00:00
nyquist@chromium.org 64562a877b Check in protobuf java code and generate lite jar.
Since we only need the lite version of protobuf, we generate a jar file based
on includes in the maven pom.xml file for the lite profile.

BUG=158382

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@167557 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2012-11-14 01:23:40 +00:00