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
This commit is contained in:
shashishekhar@chromium.org 2012-10-17 19:07:14 +00:00
Родитель 885efeb3a4
Коммит 91d3f56957
1 изменённых файлов: 7 добавлений и 2 удалений

Просмотреть файл

@ -33,7 +33,6 @@
# apk_name - The final apk will be named <apk_name>-debug.apk (or -release)
# java_in_dir - The top-level java directory. The src should be in
# <java_in_dir>/src.
# resource_dir - The directory for resources.
# Optional/automatic variables:
# additional_input_paths - These paths will be included in the 'inputs' list to
# ensure that this target is rebuilt when one of these paths changes.
@ -52,6 +51,7 @@
# the library will be included in the apk and symbolic links to the
# unstripped copy will be added to <(android_product_out) to enable native
# debugging.
# resource_dir - The directory for resources.
{
'variables': {
@ -66,6 +66,7 @@
'proguard_flags%': '',
'native_libs_paths': [],
'manifest_package_name%': 'unknown.package.name',
'resource_dir%':'',
},
'sources': [
'<@(native_libs_paths)'
@ -106,11 +107,15 @@
# If there is a separate find for additional_src_dirs, it will find the
# wrong .java files when additional_src_dirs is empty.
'>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
'<!@(find <(java_in_dir)/<(resource_dir) -name "*")',
'>@(input_jars_paths)',
'>@(native_libs_paths)',
'>@(additional_input_paths)',
],
'conditions': [
['resource_dir!=""', {
'inputs': ['<!@(find <(java_in_dir)/<(resource_dir) -name "*")']
}],
],
'outputs': [
# TODO(cjhopman): Apks are built with a -debug suffix even when they are
# built in release. This should be fixed.