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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
81 'variables': { | 81 'variables': { |
82 'res_dir': '<(java_in_dir)/res', | 82 'res_dir': '<(java_in_dir)/res', |
83 'res_crunched_dir': '<(intermediate_dir)/res_crunched', | 83 'res_crunched_dir': '<(intermediate_dir)/res_crunched', |
84 'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'], | 84 'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'], |
85 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], | 85 'resource_input_paths': ['<!@(find <(res_dir) -type f)'], |
86 'R_dir': '<(intermediate_dir)/java_R', | 86 'R_dir': '<(intermediate_dir)/java_R', |
87 'R_text_file': '<(R_dir)/R.txt', | 87 'R_text_file': '<(R_dir)/R.txt', |
88 'R_stamp': '<(intermediate_dir)/resources.stamp', | 88 'R_stamp': '<(intermediate_dir)/resources.stamp', |
89 'generated_src_dirs': ['<(R_dir)'], | 89 'generated_src_dirs': ['<(R_dir)'], |
90 'additional_input_paths': ['<(R_stamp)'], | 90 'additional_input_paths': ['<(R_stamp)'], |
91 'additional_res_dirs': [], | |
91 }, | 92 }, |
92 'all_dependent_settings': { | 93 'all_dependent_settings': { |
93 'variables': { | 94 'variables': { |
94 # Dependent jars include this target's R.java file via | 95 # Dependent jars include this target's R.java file via |
95 # generated_R_dirs and additional_R_files. | 96 # generated_R_dirs and additional_R_files. |
96 'generated_R_dirs': ['<(R_dir)'], | 97 'generated_R_dirs': ['<(R_dir)'], |
97 'additional_input_paths': ['<(R_stamp)'], | 98 'additional_input_paths': ['<(R_stamp)'], |
98 | 99 |
99 # Dependent APKs include this target's resources via | 100 # Dependent APKs include this target's resources via |
100 # additional_res_dirs, additional_res_packages, and | 101 # additional_res_dirs, additional_res_packages, and |
(...skipping 25 matching lines...) Expand all Loading... | |
126 ], | 127 ], |
127 }], | 128 }], |
128 ], | 129 ], |
129 'actions': [ | 130 'actions': [ |
130 # Generate R.java and crunch image resources. | 131 # Generate R.java and crunch image resources. |
131 { | 132 { |
132 'action_name': 'process_resources', | 133 'action_name': 'process_resources', |
133 'message': 'processing resources for <(_target_name)', | 134 'message': 'processing resources for <(_target_name)', |
134 'variables': { | 135 'variables': { |
135 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', | 136 'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml', |
137 # Include the depedencies' res dirs so that references to | |
cjhopman
2013/03/27 00:54:04
nit: s/depedencies/dependencies
newt (away)
2013/03/27 01:20:13
Done.
| |
138 # resources in dependencies can be resolved. | |
139 'all_res_dirs': ['<@(res_input_dirs)', '>@(additional_res_dirs)'], | |
136 }, | 140 }, |
137 'inputs': [ | 141 'inputs': [ |
138 '<(DEPTH)/build/android/pylib/build_utils.py', | 142 '<(DEPTH)/build/android/pylib/build_utils.py', |
139 '<(DEPTH)/build/android/process_resources.py', | 143 '<(DEPTH)/build/android/process_resources.py', |
140 '>@(resource_input_paths)', | 144 '>@(resource_input_paths)', |
cjhopman
2013/03/27 00:54:04
Does anything need to be added to the inputs to en
newt (away)
2013/03/27 01:20:13
Done.
| |
141 ], | 145 ], |
142 'outputs': [ | 146 'outputs': [ |
143 '<(R_stamp)', | 147 '<(R_stamp)', |
144 ], | 148 ], |
145 'action': [ | 149 'action': [ |
146 '<(DEPTH)/build/android/process_resources.py', | 150 '<(DEPTH)/build/android/process_resources.py', |
147 '--android-sdk', '<(android_sdk)', | 151 '--android-sdk', '<(android_sdk)', |
148 '--android-sdk-tools', '<(android_sdk_tools)', | 152 '--android-sdk-tools', '<(android_sdk_tools)', |
149 '--R-dir', '<(R_dir)', | 153 '--R-dir', '<(R_dir)', |
150 '--res-dirs', '<(res_input_dirs)', | 154 '--res-dirs', '>(all_res_dirs)', |
151 '--crunch-input-dir', '>(res_dir)', | 155 '--crunch-input-dir', '>(res_dir)', |
152 '--crunch-output-dir', '<(res_crunched_dir)', | 156 '--crunch-output-dir', '<(res_crunched_dir)', |
153 '--android-manifest', '<(android_manifest)', | 157 '--android-manifest', '<(android_manifest)', |
154 '--non-constant-id', | 158 '--non-constant-id', |
155 '--custom-package', '<(R_package)', | 159 '--custom-package', '<(R_package)', |
156 '--stamp', '<(R_stamp)', | 160 '--stamp', '<(R_stamp)', |
157 | 161 |
158 # Add hash of inputs to the command line, so if inputs change | 162 # Add hash of inputs to the command line, so if inputs change |
159 # (e.g. if a resource if removed), the command will be re-run. | 163 # (e.g. if a resource if removed), the command will be re-run. |
160 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 164 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
213 '--classes-dir=<(classes_dir)', | 217 '--classes-dir=<(classes_dir)', |
214 '--jar-path=<(jar_path)', | 218 '--jar-path=<(jar_path)', |
215 '--excluded-classes=<(excluded_classes)', | 219 '--excluded-classes=<(excluded_classes)', |
216 | 220 |
217 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 221 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
218 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 222 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
219 ] | 223 ] |
220 }, | 224 }, |
221 ], | 225 ], |
222 } | 226 } |
OLD | NEW |