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

109 Коммитов

Автор SHA1 Сообщение Дата
mkosiba@chromium.org b20b5084b2 [android] Generate strings.xml for android_webview.
This makes it possible for the android_webview component to generate
strings.xml files from .grd files in the android_webview_build
configuration.

BUG=internal b/11505352
TESTS=compile
TBR=jochen@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@269779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-05-12 14:25:07 +00:00
qsr@chromium.org 143141b62d Adding mojo_test_apk in the fyi waterfall.
R=navabi@google.com, viettrungluu@chromium.org
TBR=navabi@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@267180 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-30 11:22:41 +00:00
rmcilroy@chromium.org cf395c6c38 [Android]: Update Arm64 and x86_64 build targets to use the experimental ndk.
BUG=354405,346626

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@262969 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-10 13:42:46 +00:00
gunsch@chromium.org cb954df2e6 Removes "copy" action for extra_native_libs in java_apk.gypi.
Since the output lib file is already generated by
strip_native_libraries, the 'copy' action will result in the
unstripped version overwriting the stripped one and getting
packaged in the final APK.

Before change:

$ ninja -C out/Debug -j32 content_shell_apk
[snipped]

$ ls -l out/Debug/apks/ContentShell.apk
-rw-r----- 1 gunsch eng 27M Apr  3 15:09 out/Debug/apks/ContentShell.apk

$ unzip -l out/Debug/apks/ContentShell.apk | grep lib/
   264772  2014-04-03 14:54   lib/armeabi-v7a/gdbserver
 16030344  2014-04-03 15:00   lib/armeabi-v7a/libosmesa.so
 38423836  2014-04-03 15:09   lib/armeabi-v7a/libcontent_shell_content_view.so

$ ls -l out/Debug/lib
total 2.2G
-rwxr-x--- 1 gunsch eng 2.2G Apr  3 15:09 libcontent_shell_content_view.so
-rw-r----- 1 gunsch eng 5.7K Apr  3 15:09 libcontent_shell_content_view.so.TOC
-rwxr-x--- 1 gunsch eng  26K Mar 28 14:25 libmojo_system.so
-rw-r----- 1 gunsch eng  714 Mar 28 14:25 libmojo_system.so.TOC
-rwxr-x--- 2 gunsch eng  16M Apr  3 15:00 libosmesa.so

$ ls -l out/Debug/content_shell_apk/libs/armeabi-v7a/
total 53M
-rwxr-x--- 2 gunsch eng 259K Apr  3 14:54 gdbserver
-rwxr-x--- 1 gunsch eng  37M Apr  3 15:09 libcontent_shell_content_view.so
-rwxr-x--- 2 gunsch eng  16M Apr  3 15:00 libosmesa.so

After change:

$ ls -l out/Debug/apks/ContentShell.apk
-rw-r----- 1 gunsch eng 21M Apr  3 15:31 out/Debug/apks/ContentShell.apk

$ unzip -l out/Debug/apks/ContentShell.apk | grep lib/
   264772  2014-04-03 14:54   lib/armeabi-v7a/gdbserver
  2289816  2014-04-03 15:31   lib/armeabi-v7a/libosmesa.so
 38423836  2014-04-03 15:31   lib/armeabi-v7a/libcontent_shell_content_view.so

$ ls -l out/Debug/lib
total 2.2G
-rwxr-x--- 1 gunsch eng 2.2G Apr  3 15:31 libcontent_shell_content_view.so
-rw-r----- 1 gunsch eng 5.7K Apr  3 15:31 libcontent_shell_content_view.so.TOC
-rwxr-x--- 1 gunsch eng  16M Apr  3 15:30 libosmesa.so

$ ls -l out/Debug/content_shell_apk/libs/armeabi-v7a/
total 40M
-rwxr-x--- 2 gunsch eng 259K Apr  3 14:54 gdbserver
-rwxr-x--- 1 gunsch eng  37M Apr  3 15:31 libcontent_shell_content_view.so
-rwxr-x--- 1 gunsch eng 2.2M Apr  3 15:31 libosmesa.so

BUG=
R=peter@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@262461 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-04-08 18:39:54 +00:00
thakis@chromium.org a7c1aae81e android: Stop passing defines to apk-obfuscate.xml which it ignores.
Most of these are leftovers from when apk-obfuscate.xml was moved to its
own file in https://chromiumcodereview.appspot.com/12880007

CREATE_TEST_JAR_PATH was removed in
https://codereview.chromium.org/35473002

No intended behavior change.

BUG=none
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@260563 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-31 16:36:26 +00:00
thakis@chromium.org 13820ece50 android: Do not pass source_dir to apk-package.xml.
apkbuilder only uses sourcefolder to package non-java files (see
addSourceFolder() and checkFileForPackaging() in
e162064a7b/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilder.java ),
and our java/src folders only contain .java (and OWNERS) files.

(Determined via `find . -type f -a -path '*/src/*' -a -not -name '*.java'` and
manually ignoring everything not looking like a java folder.)

No intended behavior change; Chrome.apk looks identical with and without
this change (except for timestamps).

BUG=none
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@260047 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-28 00:51:42 +00:00
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
rmcilroy@chromium.org e1f50e9a4d Enable Arm64 target arch in gyp build config
Initial support to get us started.  There is a lot more work to do before we can compile for arm64.

BUG=354405

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@258363 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-20 18:35:49 +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 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 c5558788b9 android: Fix build more after 255971.
Two more ant scripts were implicitly depending on the generated
manifest file via an implicit dependency through a stamp file.
Follow-up to https://codereview.chromium.org/193163004

BUG=256020
R=cjhopman@chromium.org
TBR=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@256038 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-10 21:36:51 +00:00
thakis@chromium.org d1a32a2565 android: Remove unused codegen_input_paths and library_manifest_paths.
As far as I can tell, nothing ever sets them. Remove them and the ant code
that runs only when library_manifest_paths is set. No intended behavior change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255971 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-10 18:06:16 +00:00
thakis@chromium.org 670a16fdad android: Stop calling md5sum for ant_obfuscate step.
All inputs except instr_stamp are passed in the command and instr_stamp
is a single fixed file, so this isn't necessary. No functionality change.

BUG=177552
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255451 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 22:36:52 +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 1f62d2dd1a android: Make dex_action.gypi not call md5sum.
No intended behavior change.

dex_action.gypi didn't pass its input_paths variable to dex.py,
but that was only set in a single place, and only to a single file there.
It was only used in java_apk.gypi which does manual threading of
stamp files to order actions (since it's a gypi, it can't easily use type
none targets with dependencies). Since dex.py doesn't look at this
stamp file at all, it doesn't need to rerun when the stamp file disappears.

To make this a bit more obvious, remove dex_action.gypi's input_paths
variable and set 'inputs' directly in the one place with the stamp file.
(dex.py will still rerun if the name of the stamp file changes, due to
regular timestamp handling.)

java_apk.gypi used to set input_paths to two files in proguard-enabled
files – change it to depend only on obfuscate_stamp in proguard builds,
as the step that writes that already depends on instr_stamp. (This isn't
necessary as the proguard state is part of the dex.py commandline, so
toggling between proguard and no proguard would rebuild correctly
anyways, but it's conceptually a bit nicer.)

Also set proguard_enabled_input_path unconditionally. Again, no behavior
change, but keeps the gyp a bit shorter.

BUG=177552
NOTRY=true

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

R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255403 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 18:47:27 +00:00
pkotwicz@chromium.org fd824bfc3b Revert of android: Make dex_action.gypi not call md5sum. (https://codereview.chromium.org/183883024/)
Reason for revert:
Experimentally reverting because it is possible that this CL broke the android build http://build.chromium.org/p/chromium/builders/Android/builds/21418/steps/compile/logs/stdio

Will undo the revert if this CL is innocent

Original issue's description:
> android: Make dex_action.gypi not call md5sum.
> 
> No intended behavior change.
> 
> dex_action.gypi didn't pass its input_paths variable to dex.py,
> but that was only set in a single place, and only to a single file there.
> It was only used in java_apk.gypi which does manual threading of
> stamp files to order actions (since it's a gypi, it can't easily use type
> none targets with dependencies). Since dex.py doesn't look at this
> stamp file at all, the it doesn't need to rerun when the stamp file disappears.
> 
> To make this a bit more obvious, remove dex_action.gypi's input_paths
> variable and set 'inputs' directly in the one place with the stamp file.
> (dex.py will still rerun if the name of the stamp file changes, due to
> regular timestamp handling.)
> 
> BUG=177552
> NOTRY=true
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=255325

TBR=cjhopman@chromium.org,thakis@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=177552

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255356 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 15:53:56 +00:00
thakis@chromium.org 29086b4458 android: Make dex_action.gypi not call md5sum.
No intended behavior change.

dex_action.gypi didn't pass its input_paths variable to dex.py,
but that was only set in a single place, and only to a single file there.
It was only used in java_apk.gypi which does manual threading of
stamp files to order actions (since it's a gypi, it can't easily use type
none targets with dependencies). Since dex.py doesn't look at this
stamp file at all, the it doesn't need to rerun when the stamp file disappears.

To make this a bit more obvious, remove dex_action.gypi's input_paths
variable and set 'inputs' directly in the one place with the stamp file.
(dex.py will still rerun if the name of the stamp file changes, due to
regular timestamp handling.)

BUG=177552
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@255325 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-03-06 13:11:06 +00:00
aberent@chromium.org 0a747f0761 Remove shim classes etc. that were needed to move Android Loader
Also those needed to move the Trace classes to base, and tidy
up the other TODOs left over from these moves.

Depends on:
https://codereview.chromium.org/141223002 and
https://chrome-internal-review.googlesource.com/#/c/153179

BUG=225101

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250479 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-11 19:59:20 +00:00
aberent@chromium.org d9bb84216f Move the android library loader from content to base
The android library loader has no logical connection with content. Mojo
shell, which doesn't depend on content, wants to use it. This CL
moves it from content to base.

BUG=225101
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@250113 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-02-10 16:19:22 +00:00
thakis@chromium.org 1a25390f79 Remove trailing periods from rule messages.
See commit message of r232166 for details.

BUG=none
NOTRY=true
R=scottmg@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@243790 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2014-01-09 06:50:54 +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
aberent@chromium.org 6af865d391 Check library version and handle library load errors
This CL modifies the build to incorporate the expected C++ library version
in the Java code. This is then checked when the library is loaded, to
make sure that the C++ and Java builds match.

This CL also implements error handling when library loads fail or the
loaded version doesn't match the expected version.

BUG=311644

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@237779 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-11-28 14:28:52 +00:00
thakis@chromium.org 4cef26f0d7 Remove trailing "." from message lines.
cs.chromium.org has way fewer hits for
    'message'.*\.',?$ file:gyp
than for
    'message'.*[^\.]',?$ file:gyp

so standardize on the latter.

BUG=none
TEST=less ocd when watching build output
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@232166 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-31 18:08:28 +00:00
frankf@chromium.org c64a9c46c2 [Android] Exclude test apks's from emma coverage.
BUG=None

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@231913 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-30 20:33:12 +00:00
digit@chromium.org a48f19820d Android: Add chrome-specific dynamic linker.
This patch adds a new Chrome-specific dynamic linker for Android,
that implements RELRO section sharing in order to save about 1.3 MB
of RAM per renderer process in content-based programs (ContentShell,
ChromiumTestShell, Chrome, etc...)

The linker is disabled by default. For more details, see the corresponding bug entry.

This introduces a new test package (content_linker_test_apk) as well as a new test category. To build and test this feature, do the following:

  ninja -C out/Debug content_linker_test_apk
  build/android/test_runner.py linker


BUG=287739
R=qsr@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@229921 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-10-21 21:40:44 +00:00
peter@chromium.org c40ed24e7c Add a gyp variable to indicate additional native libraries to be included in the APK
Based on a patch by Chris Hopman <cjhopman@chromium.org>. This
patch allows us to lazily load libosmesa.so only when it's
needed for content_shell, rather than directly linking it.
https://codereview.chromium.org/23868030/

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@224424 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-20 17:44:33 +00:00
bulach@chromium.org 39a120ec32 Android: make APK targets depend on md5sum.
The same dependency applies for all APKs, so remove from content_shell_apk
and move it down to java_apk.gypi.

BUG=
TBR=jochen@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@224145 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-19 16:33:08 +00:00
dtrainor@chromium.org 59bdd25bf6 This fixes the component build.
Need to pass the CONFIGURATION_NAME through to the push python libs.

BUG=

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@222171 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-09-10 01:39:25 +00:00
gkanwar@chromium.org 3b5e53d87b Fixes dexing of emma_device.jar
NOTRY=True
BUG=255644

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@219201 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-23 03:44:54 +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
ppi@chromium.org f5af020b79 Add dependency on android_tools in java_apk.gypi for all test apks.
This patch adds a dependency on entire android_tools target that contains
forwarder2 and md5sum to java_apk.gypi for all test apks, so that individual
test apk targets do not need to explicitly depend on the tools required to run
them.


BUG=271482

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@217386 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-13 23:46:39 +00:00
navabi@google.com 45bd690053 Some of the build tools have moved in the SDK (e.g. aapt, aidl) from
sdk/platform-tools/ to sdk/build-tools/<tools-version>/. The tools version is 18.0.1.

BUG=263966

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@216612 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-08-09 06:48:18 +00:00
cjhopman@chromium.org ea831049c4 [Android] Add an action to check/record attached devices
When doing a gyp_managed_install, we install APKs to the attached
device. Currently this can fail in many ways (no device attached,
multiple devices attached, device offline, device doesn't have root,
etc.). In addition, we need to detect changes to the attached device
(particularly when the device is switched, when an APK is
 uninstalled/updated).

The current approach is to check all this information in the action
interacting with the device. This means that when there is some
problem we print the same warning messages for every APK that is built,
and, in some cases, multiple times for each APK. Also, we have to run
every install/push action every build because we detect changes to the
attached device in that action.

This change creates a new build action, "get device configurations".
This action inspects the attached devices, filters out offline devices,
filters out devices without root, and then writes a configuration
file with the id+metadata for the first non-filtered device. This
configuration is then used by each of the build steps that interacts
with the device. This consolidates all the device checking to a single
place, and the build actions don't need to do any checking. In
addition, to detect changes in the attached device, we only need to run
this single action every build and the install/push actions will only
change when the device/metadata changes.

Also, with this change we can now gracefully handle the case where
multiple devices are attached (currently just write the configuration
for the first valid device and install to that one).

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@209582 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-07-02 01:52:33 +00:00
cjhopman@chromium.org ba517b8506 [Android] Support building standalone APK in component build
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).

This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.

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

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

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@208529 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-25 18:42:07 +00:00
dfalcantara@chromium.org 458e6b0e2b Revert "[Android] Support building standalone APK in component build"
This breaks the Android component build.

This reverts commit 125e64a9eb6406446fb864aea9fa887521f19616.
>> [Android] Support building standalone APK in component build
>>
>> Many people's workflows assume that they can install the APK created in
>> out/Debug/apks. With the component build that APK is actually an
>> "incomplete" APK that cannot be manually installed (or rather causes
>> obscure errors when manually installed).
>>
>> This change does two things. First, it moves the "incomplete" APK
>> output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
>> accidental installs of the "incomplete" APK. Second, it introduces an
>> option (create_standalone_apk) that when doing a component build, if
>> set, will merge the shared libraries into the "incomplete" APK to
>> create a standalone APK. This standalone APK will be created in
>> out/Debug/apks/.
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207516

BUG=
R=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207587 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 21:42:06 +00:00
cjhopman@chromium.org f00dfb88a8 [Android] Support building standalone APK in component build
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).

This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.

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

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207516 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 19:51:29 +00:00
skyostil@google.com 283725629a Revert 207345 "[Android] Support building standalone APK in comp..."
This broke building of ChromeTest.apk. See:

http://chromegw.corp.google.com/i/clank.tot/builders/instrumentation-yakju-clankium-tot/builds/11555/steps/chrome_smoke_instrumentation_tests/logs/stdio

> [Android] Support building standalone APK in component build
> 
> Many people's workflows assume that they can install the APK created in
> out/Debug/apks. With the component build that APK is actually an
> "incomplete" APK that cannot be manually installed (or rather causes
> obscure errors when manually installed).
> 
> This change does two things. First, it moves the "incomplete" APK
> output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
> accidental installs of the "incomplete" APK. Second, it introduces an
> option (create_standalone_apk) that when doing a component build, if
> set, will merge the shared libraries into the "incomplete" APK to
> create a standalone APK. This standalone APK will be created in
> out/Debug/apks/.
> 
> Review URL: https://chromiumcodereview.appspot.com/14843017

TBR=cjhopman@chromium.org

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207439 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 15:31:28 +00:00
cjhopman@chromium.org 7ad7e2169a [Android] Support building standalone APK in component build
Many people's workflows assume that they can install the APK created in
out/Debug/apks. With the component build that APK is actually an
"incomplete" APK that cannot be manually installed (or rather causes
obscure errors when manually installed).

This change does two things. First, it moves the "incomplete" APK
output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
accidental installs of the "incomplete" APK. Second, it introduces an
option (create_standalone_apk) that when doing a component build, if
set, will merge the shared libraries into the "incomplete" APK to
create a standalone APK. This standalone APK will be created in
out/Debug/apks/.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@207345 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-06-20 07:58:19 +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
cjhopman@chromium.org f13445c6a5 [Android] Only always trigger stripping with component build
With the component build we need to always trigger stripping because we
can't specify the inputs correctly at gyp time. This is not required
for the non-component build.

Also, slightly refactor strip_native_libraries.gypi and its users to
make it more clear what variables are being used by the .gypi.

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@200422 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-05-16 02:40:29 +00:00
cjhopman@chromium.org 60ec4ecb2a [Android] Include gdbserver in APKs
Debug APKs with native libraries should include gdbserver. Copy this
into the apk_package_native_libs_dir. Then, the apkbuilder task will
include this in the APK for debug builds (but not for release builds).

TEST=unzip -l ContentShell.apk should list gdbserver for debug builds
(but not for release)

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@196203 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-24 19:31:22 +00:00
cjhopman@chromium.org 823fb4b3e4 [Android] Use CONFIGURATION_NAME-specific device folders
If the device folder is not specific to debug/release, then switching
configurations changes the state on the device without updating the
corresponding records on the host (i.e. it only updates the ones for
that configuration).

NOTRY=true
BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@195852 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-23 18:30:26 +00:00
cjhopman@chromium.org fdc31e70fc [Android] Add native library to strip inputs
If the native library changes, we should re-strip/copy it. Add it to the inputs
so that we do that.

BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@195274 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-19 20:56:53 +00:00
cjhopman@chromium.org b88f8946bf [Android] Use a script on the device for creating library symlinks
On new versions of Android, re-installing an APK creates a new /lib/
folder for native libraries. This means we need to recreate all the
symlinks in that directory (not just the ones that have changed).

To make all these links quickly, it should run as a single adb command.
To make that simple, we first create a simple script that, when run,
creates all the symlinks for an APK. Then, after any install, we send a
single adb command to run that script.

This also requires that the apk_install script only triggers its 
dependents when it actually installs an apk.

BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@195124 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-19 09:16:13 +00:00
yfriedman@chromium.org 84c9f35d43 [Android] Fix forwarder for the component build
Repurposes the gyp scripts for processing native libraries for an apk and use them for a native library (i.e. forwarder).

Additionally, adjusts the forwarder python script to set LD_LIBRARY_PATH when invoking the forwarder.

BUG=158821

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@194833 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-18 07:23:26 +00:00
yfriedman@chromium.org c2bdfcac0e [Android] Fix managed install.
It was missing a comma, breaking gyp.
BUG=158821
TBR=cjhopman
NOTRY=true

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

git-svn-id: http://src.chromium.org/svn/trunk/src/build@193686 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
2013-04-11 18:20:54 +00:00