Chromium Code Reviews| Index: build/java_apk.gypi |
| diff --git a/build/java_apk.gypi b/build/java_apk.gypi |
| index 6d391881c00ebf4ea596b3ee254724ab48ab7887..00f5447562199e059d7a821523dd341248645a3d 100644 |
| --- a/build/java_apk.gypi |
| +++ b/build/java_apk.gypi |
| @@ -59,6 +59,8 @@ |
| # resource_dir - The directory for resources. |
| # R_package - A custom Java package to generate the resource file R.java in. |
| # By default, the package given in AndroidManifest.xml will be used. |
| +# java_strings_grd - The name of the grd file from which to generate localized |
| +# strings.xml files, if any. |
| { |
| 'variables': { |
| @@ -78,6 +80,8 @@ |
| 'additional_res_dirs': [], |
| 'additional_res_packages': [], |
| 'is_test_apk%': 0, |
| + 'java_strings_grd%': '', |
| + 'grit_grd_file%': '', |
|
shashi
2013/01/04 00:40:45
Is grit_grd_file going to be overridden? Do we nee
newt (away)
2013/01/04 01:00:58
I added this default value for grit_grd_file becau
|
| }, |
| 'sources': [ |
| '<@(native_libs_paths)' |
| @@ -111,6 +115,35 @@ |
| ], |
| }, |
| ], |
| + 'conditions': [ |
| + ['R_package != ""', { |
| + 'variables': { |
| + # We generate R.java in package R_package (in addition to the package |
| + # listed in the AndroidManifest.xml, which is unavoidable). |
| + 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
| + 'additional_res_packages': ['<(R_package)'], |
| + }, |
| + }], |
| + ['java_strings_grd != ""', { |
|
newt (away)
2013/01/04 00:17:27
This is largely copied from java.gypi, which is no
|
| + 'variables': { |
| + 'out_res_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res', |
| + 'additional_res_dirs': ['<(out_res_dir)'], |
| + # grit_grd_file is used by grit_action.gypi, included below. |
| + 'grit_grd_file': '<(java_in_dir)/grd/<(java_strings_grd)', |
| + }, |
| + 'actions': [ |
| + { |
| + 'action_name': 'generate_localized_strings_xml', |
| + 'variables': { |
| + 'grit_out_dir': '<(out_res_dir)', |
| + # resource_ids is unneeded since we don't generate .h headers. |
| + 'grit_resource_ids': '', |
| + }, |
| + 'includes': ['../build/grit_action.gypi'], |
| + }, |
| + ], |
| + }], |
| + ], |
| 'actions': [ |
| { |
| 'action_name': 'ant_<(package_name)_apk', |
| @@ -131,6 +164,14 @@ |
| ['resource_dir!=""', { |
| 'inputs': ['<!@(find <(java_in_dir)/<(resource_dir) -name "*")'] |
| }], |
| + ['java_strings_grd != ""', { |
| + 'inputs': [ |
| + # TODO(newt): replace this with .../values/strings.xml once |
| + # the English strings.xml is generated as well? That would be |
| + # simpler and faster and should be equivalent. |
| + '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(out_res_dir)" <(grit_grd_file))', |
| + ], |
| + }], |
| ['is_test_apk == 1', { |
| 'variables': { |
| 'additional_res_dirs=': [], |
| @@ -182,14 +223,4 @@ |
| ] |
| }, |
| ], |
| - 'conditions': [ |
| - ['R_package != ""', { |
| - 'variables': { |
| - # We generate R.java in package R_package (in addition to the package |
| - # listed in the AndroidManifest.xml, which is unavoidable). |
| - 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'], |
| - 'additional_res_packages': ['<(R_package)'], |
| - }, |
| - }], |
| - ], |
| } |