Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
| 6 # to build Java in a consistent manner. | 6 # to build Java in a consistent manner. |
| 7 # | 7 # |
| 8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
| 9 # { | 9 # { |
| 10 # 'target_name': 'my-package_java', | 10 # 'target_name': 'my-package_java', |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 76 'variables': { | 76 'variables': { |
| 77 'input_jars_paths': ['<(jar_path)'], | 77 'input_jars_paths': ['<(jar_path)'], |
| 78 'library_dexed_jars_paths': ['<(dex_path)'], | 78 'library_dexed_jars_paths': ['<(dex_path)'], |
| 79 }, | 79 }, |
| 80 }, | 80 }, |
| 81 'conditions': [ | 81 'conditions': [ |
| 82 ['has_java_resources == 1', { | 82 ['has_java_resources == 1', { |
| 83 'variables': { | 83 'variables': { |
| 84 'res_dir': '<(java_in_dir)/res', | 84 'res_dir': '<(java_in_dir)/res', |
| 85 'res_crunched_dir': '<(intermediate_dir)/res_crunched', | 85 'res_crunched_dir': '<(intermediate_dir)/res_crunched', |
| 86 'res_ldrtl_dir': '<(intermediate_dir)/res_ldrtl', | |
|
newt (away)
2013/04/24 23:34:38
maybe "res_mirrored_dir"
Kibeom Kim (inactive)
2013/04/25 00:04:39
Done.
| |
| 86 'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'], | 87 'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'], |
| 87 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], | 88 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], |
| 88 'R_dir': '<(intermediate_dir)/java_R', | 89 'R_dir': '<(intermediate_dir)/java_R', |
| 89 'R_text_file': '<(R_dir)/R.txt', | 90 'R_text_file': '<(R_dir)/R.txt', |
| 90 'R_stamp': '<(intermediate_dir)/resources.stamp', | 91 'R_stamp': '<(intermediate_dir)/resources.stamp', |
| 91 'generated_src_dirs': ['<(R_dir)'], | 92 'generated_src_dirs': ['<(R_dir)'], |
| 92 'additional_input_paths': ['<(R_stamp)'], | 93 'additional_input_paths': ['<(R_stamp)'], |
| 93 'additional_res_dirs': [], | 94 'additional_res_dirs': [], |
| 94 'dependencies_res_files': [], | 95 'dependencies_res_files': [], |
| 95 }, | 96 }, |
| 96 'all_dependent_settings': { | 97 'all_dependent_settings': { |
| 97 'variables': { | 98 'variables': { |
| 98 # Dependent jars include this target's R.java file via | 99 # Dependent jars include this target's R.java file via |
| 99 # generated_R_dirs and include its resources via | 100 # generated_R_dirs and include its resources via |
| 100 # dependencies_res_files. | 101 # dependencies_res_files. |
| 101 'generated_R_dirs': ['<(R_dir)'], | 102 'generated_R_dirs': ['<(R_dir)'], |
| 102 'additional_input_paths': ['<(R_stamp)'], | 103 'additional_input_paths': ['<(R_stamp)'], |
| 103 'dependencies_res_files': ['<@(resource_input_paths)'], | 104 'dependencies_res_files': ['<@(resource_input_paths)'], |
| 104 | 105 |
| 105 # Dependent APKs include this target's resources via | 106 # Dependent APKs include this target's resources via |
| 106 # additional_res_dirs, additional_res_packages, and | 107 # additional_res_dirs, additional_res_packages, and |
| 107 # additional_R_text_files. | 108 # additional_R_text_files. |
| 108 'additional_res_dirs': ['<(res_crunched_dir)', '<@(res_input_dirs)'], | 109 'additional_res_dirs': ['<(res_crunched_dir)', '<(res_ldrtl_dir)', '<@ (res_input_dirs)'], |
| 109 'additional_res_packages': ['<(R_package)'], | 110 'additional_res_packages': ['<(R_package)'], |
| 110 'additional_R_text_files': ['<(R_text_file)'], | 111 'additional_R_text_files': ['<(R_text_file)'], |
| 111 }, | 112 }, |
| 112 }, | 113 }, |
| 113 'conditions': [ | 114 'conditions': [ |
| 114 ['java_strings_grd != ""', { | 115 ['java_strings_grd != ""', { |
| 115 'variables': { | 116 'variables': { |
| 116 'res_grit_dir': '<(intermediate_dir)/res_grit', | 117 'res_grit_dir': '<(intermediate_dir)/res_grit', |
| 117 'res_input_dirs': ['<(res_grit_dir)'], | 118 'res_input_dirs': ['<(res_grit_dir)'], |
| 118 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', | 119 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 153 '<(R_stamp)', | 154 '<(R_stamp)', |
| 154 ], | 155 ], |
| 155 'action': [ | 156 'action': [ |
| 156 'python', '<(DEPTH)/build/android/gyp/process_resources.py', | 157 'python', '<(DEPTH)/build/android/gyp/process_resources.py', |
| 157 '--android-sdk', '<(android_sdk)', | 158 '--android-sdk', '<(android_sdk)', |
| 158 '--android-sdk-tools', '<(android_sdk_tools)', | 159 '--android-sdk-tools', '<(android_sdk_tools)', |
| 159 '--R-dir', '<(R_dir)', | 160 '--R-dir', '<(R_dir)', |
| 160 '--res-dirs', '>(all_res_dirs)', | 161 '--res-dirs', '>(all_res_dirs)', |
| 161 '--crunch-input-dir', '>(res_dir)', | 162 '--crunch-input-dir', '>(res_dir)', |
| 162 '--crunch-output-dir', '<(res_crunched_dir)', | 163 '--crunch-output-dir', '<(res_crunched_dir)', |
| 164 '--xml-ldrtl-input-dir', '<(res_dir)', | |
|
newt (away)
2013/04/24 23:34:38
">(res_dir)"
Kibeom Kim (inactive)
2013/04/25 00:04:39
Hmm.. but strangely it gives an error. It doesn't
| |
| 165 '--xml-ldrtl-output-dir', '<(res_ldrtl_dir)', | |
| 163 '--android-manifest', '<(android_manifest)', | 166 '--android-manifest', '<(android_manifest)', |
| 164 '--non-constant-id', | 167 '--non-constant-id', |
| 165 '--custom-package', '<(R_package)', | 168 '--custom-package', '<(R_package)', |
| 166 '--stamp', '<(R_stamp)', | 169 '--stamp', '<(R_stamp)', |
| 167 | 170 |
| 168 # Add hash of inputs to the command line, so if inputs change | 171 # Add hash of inputs to the command line, so if inputs change |
| 169 # (e.g. if a resource if removed), the command will be re-run. | 172 # (e.g. if a resource if removed), the command will be re-run. |
| 170 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 173 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 171 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 174 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 172 ], | 175 ], |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 270 | 273 |
| 271 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 274 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
| 272 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 275 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 273 | 276 |
| 274 '<(jar_path)', | 277 '<(jar_path)', |
| 275 ] | 278 ] |
| 276 }, | 279 }, |
| 277 | 280 |
| 278 ], | 281 ], |
| 279 } | 282 } |
| OLD | NEW |