OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 """Writes a build_config file. | 7 """Writes a build_config file. |
8 | 8 |
9 The build_config file for a target is a json file containing information about | 9 The build_config file for a target is a json file containing information about |
10 how to build that target based on the target's dependencies. This includes | 10 how to build that target based on the target's dependencies. This includes |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 deps_info['resources_zip'] = options.resources_zip | 164 deps_info['resources_zip'] = options.resources_zip |
165 if options.srcjar: | 165 if options.srcjar: |
166 deps_info['srcjar'] = options.srcjar | 166 deps_info['srcjar'] = options.srcjar |
167 if options.package_name: | 167 if options.package_name: |
168 deps_info['package_name'] = options.package_name | 168 deps_info['package_name'] = options.package_name |
169 | 169 |
170 if options.type == 'android_resources' or options.type == 'android_apk': | 170 if options.type == 'android_resources' or options.type == 'android_apk': |
171 config['resources'] = {} | 171 config['resources'] = {} |
172 config['resources']['dependency_zips'] = [ | 172 config['resources']['dependency_zips'] = [ |
173 c['resources_zip'] for c in all_resources_deps] | 173 c['resources_zip'] for c in all_resources_deps] |
| 174 config['resources']['extra_package_names'] = [] |
| 175 |
| 176 if options.type == 'android_apk': |
174 config['resources']['extra_package_names'] = [ | 177 config['resources']['extra_package_names'] = [ |
175 c['package_name'] for c in all_resources_deps if 'package_name' in c] | 178 c['package_name'] for c in all_resources_deps if 'package_name' in c] |
176 | 179 |
177 | 180 |
178 if options.type == 'android_apk': | 181 if options.type == 'android_apk': |
179 config['apk_dex'] = {} | 182 config['apk_dex'] = {} |
180 dex_config = config['apk_dex'] | 183 dex_config = config['apk_dex'] |
181 # TODO(cjhopman): proguard version | 184 # TODO(cjhopman): proguard version |
182 dex_deps_files = [c['dex_path'] for c in all_library_deps] | 185 dex_deps_files = [c['dex_path'] for c in all_library_deps] |
183 dex_config['dependency_dex_files'] = dex_deps_files | 186 dex_config['dependency_dex_files'] = dex_deps_files |
(...skipping 30 matching lines...) Expand all Loading... |
214 build_utils.WriteJson(config, options.build_config, only_if_changed=True) | 217 build_utils.WriteJson(config, options.build_config, only_if_changed=True) |
215 | 218 |
216 if options.depfile: | 219 if options.depfile: |
217 build_utils.WriteDepfile( | 220 build_utils.WriteDepfile( |
218 options.depfile, | 221 options.depfile, |
219 all_deps_config_paths + build_utils.GetPythonDependencies()) | 222 all_deps_config_paths + build_utils.GetPythonDependencies()) |
220 | 223 |
221 | 224 |
222 if __name__ == '__main__': | 225 if __name__ == '__main__': |
223 sys.exit(main(sys.argv[1:])) | 226 sys.exit(main(sys.argv[1:])) |
OLD | NEW |