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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 # Generate R.java and crunch image resources. | 146 # Generate R.java and crunch image resources. |
| 147 { | 147 { |
| 148 'action_name': 'process_resources', | 148 'action_name': 'process_resources', |
| 149 'message': 'processing resources for <(_target_name)', | 149 'message': 'processing resources for <(_target_name)', |
| 150 'variables': { | 150 'variables': { |
| 151 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', | 151 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', |
| 152 # Include the dependencies' res dirs so that references to | 152 # Include the dependencies' res dirs so that references to |
| 153 # resources in dependencies can be resolved. | 153 # resources in dependencies can be resolved. |
| 154 'all_res_dirs': ['<@(res_input_dirs)', | 154 'all_res_dirs': ['<@(res_input_dirs)', |
| 155 '>@(dependencies_res_input_dirs)',], | 155 '>@(dependencies_res_input_dirs)',], |
| 156 # Write the inputs list to a file, so that the action command | |
| 157 # line won't exceed the OS limits when calculating the checksum | |
| 158 # of the list. | |
| 159 'inputs_list_file': '<|(inputs_list.tmp <@(_inputs))' | |
|
cjhopman
2013/07/25 15:35:17
I think this file is written into the source tree,
cjhopman
2013/07/25 15:35:17
Since inputs contains things that are late expande
newt (away)
2013/07/25 17:55:13
Could we put this in the out/ folder? in <(interme
cjhopman
2013/07/25 18:05:26
You can't write to the output directory at gyp tim
newt (away)
2013/07/25 18:11:40
what happens if you try to write to the output dir
cjhopman
2013/07/25 18:17:50
What happens is generator dependent, on ninja it e
whywhat
2013/07/25 20:01:48
.tmp files were in the untracked section of my git
whywhat
2013/07/25 20:01:48
Done.
whywhat
2013/07/25 20:01:48
Done.
whywhat
2013/07/25 20:01:48
Done.
whywhat
2013/07/25 20:01:48
Ack
On 2013/07/25 18:05:26, cjhopman wrote:
whywhat
2013/07/25 20:01:48
Ack
On 2013/07/25 17:55:13, newt wrote:
| |
| 156 }, | 160 }, |
| 157 'inputs': [ | 161 'inputs': [ |
| 158 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 162 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 159 '<(DEPTH)/build/android/gyp/process_resources.py', | 163 '<(DEPTH)/build/android/gyp/process_resources.py', |
| 160 '>@(resource_input_paths)', | 164 '>@(resource_input_paths)', |
| 161 '>@(dependencies_res_files)', | 165 '>@(dependencies_res_files)', |
| 162 ], | 166 ], |
| 163 'outputs': [ | 167 'outputs': [ |
| 164 '<(R_stamp)', | 168 '<(R_stamp)', |
| 165 ], | 169 ], |
| 166 'action': [ | 170 'action': [ |
| 167 'python', '<(DEPTH)/build/android/gyp/process_resources.py', | 171 'python', '<(DEPTH)/build/android/gyp/process_resources.py', |
| 168 '--android-sdk', '<(android_sdk)', | 172 '--android-sdk', '<(android_sdk)', |
| 169 '--android-sdk-tools', '<(android_sdk_tools)', | 173 '--android-sdk-tools', '<(android_sdk_tools)', |
| 170 '--R-dir', '<(R_dir)', | 174 '--R-dir', '<(R_dir)', |
| 171 '--res-dirs', '>(all_res_dirs)', | 175 '--res-dirs', '>(all_res_dirs)', |
| 172 '--crunch-input-dir', '>(res_dir)', | 176 '--crunch-input-dir', '>(res_dir)', |
| 173 '--crunch-output-dir', '<(res_crunched_dir)', | 177 '--crunch-output-dir', '<(res_crunched_dir)', |
| 174 '--android-manifest', '<(android_manifest)', | 178 '--android-manifest', '<(android_manifest)', |
| 175 '--non-constant-id', | 179 '--non-constant-id', |
| 176 '--custom-package', '<(R_package)', | 180 '--custom-package', '<(R_package)', |
| 177 '--stamp', '<(R_stamp)', | 181 '--stamp', '<(R_stamp)', |
| 178 | 182 |
| 179 # Add hash of inputs to the command line, so if inputs change | 183 # Add hash of inputs to the command line, so if inputs change |
| 180 # (e.g. if a resource if removed), the command will be re-run. | 184 # (e.g. if a resource if removed), the command will be re-run. |
| 181 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 185 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 182 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 186 '--ignore=>!(cat <(inputs_list_file) | md5sum)', |
|
cjhopman
2013/07/25 15:35:17
inputs_list_file might need to be late expanded li
whywhat
2013/07/25 20:01:48
Done.
| |
| 183 ], | 187 ], |
| 184 }, | 188 }, |
| 185 # Generate API 14 resources. | 189 # Generate API 14 resources. |
| 186 { | 190 { |
| 187 'action_name': 'generate_api_14_resources_<(_target_name)', | 191 'action_name': 'generate_api_14_resources_<(_target_name)', |
| 188 'message': 'Generating Android API 14 resources <(_target_name)', | 192 'message': 'Generating Android API 14 resources <(_target_name)', |
| 189 'variables' : { | 193 'variables' : { |
| 190 'res_v14_additional_options': [], | 194 'res_v14_additional_options': [], |
| 191 }, | 195 }, |
| 192 'conditions': [ | 196 'conditions': [ |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 { | 299 { |
| 296 'action_name': 'dex_<(_target_name)', | 300 'action_name': 'dex_<(_target_name)', |
| 297 'variables': { | 301 'variables': { |
| 298 'dex_input_paths': [ '<(jar_path)' ], | 302 'dex_input_paths': [ '<(jar_path)' ], |
| 299 'output_path': '<(dex_path)', | 303 'output_path': '<(dex_path)', |
| 300 }, | 304 }, |
| 301 'includes': [ 'android/dex_action.gypi' ], | 305 'includes': [ 'android/dex_action.gypi' ], |
| 302 }, | 306 }, |
| 303 ], | 307 ], |
| 304 } | 308 } |
| OLD | NEW |