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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 config['resources']['dependency_zips'] = [ | 158 config['resources']['dependency_zips'] = [ |
159 c['resources_zip'] for c in all_resources_deps] | 159 c['resources_zip'] for c in all_resources_deps] |
160 | 160 |
161 if options.type == 'android_apk': | 161 if options.type == 'android_apk': |
162 config['apk_dex'] = {} | 162 config['apk_dex'] = {} |
163 dex_config = config['apk_dex'] | 163 dex_config = config['apk_dex'] |
164 # TODO(cjhopman): proguard version | 164 # TODO(cjhopman): proguard version |
165 dex_deps_files = [c['dex_path'] for c in all_library_deps] | 165 dex_deps_files = [c['dex_path'] for c in all_library_deps] |
166 dex_config['dependency_dex_files'] = dex_deps_files | 166 dex_config['dependency_dex_files'] = dex_deps_files |
167 | 167 |
| 168 config['dist_jar'] = { |
| 169 'dependency_jars': [ |
| 170 c['jar_path'] for c in all_library_deps |
| 171 ] |
| 172 } |
| 173 |
168 library_paths = [] | 174 library_paths = [] |
169 java_libraries_list = [] | 175 java_libraries_list = [] |
170 if options.native_libs: | 176 if options.native_libs: |
171 libraries = build_utils.ParseGypList(options.native_libs) | 177 libraries = build_utils.ParseGypList(options.native_libs) |
172 if libraries: | 178 if libraries: |
173 libraries_dir = os.path.dirname(libraries[0]) | 179 libraries_dir = os.path.dirname(libraries[0]) |
174 write_ordered_libraries.SetReadelfPath(options.readelf_path) | 180 write_ordered_libraries.SetReadelfPath(options.readelf_path) |
175 write_ordered_libraries.SetLibraryDirs([libraries_dir]) | 181 write_ordered_libraries.SetLibraryDirs([libraries_dir]) |
176 all_native_library_deps = ( | 182 all_native_library_deps = ( |
177 write_ordered_libraries.GetSortedTransitiveDependenciesForBinaries( | 183 write_ordered_libraries.GetSortedTransitiveDependenciesForBinaries( |
(...skipping 13 matching lines...) Expand all Loading... |
191 build_utils.WriteJson(config, options.build_config, only_if_changed=True) | 197 build_utils.WriteJson(config, options.build_config, only_if_changed=True) |
192 | 198 |
193 if options.depfile: | 199 if options.depfile: |
194 build_utils.WriteDepfile( | 200 build_utils.WriteDepfile( |
195 options.depfile, | 201 options.depfile, |
196 all_deps_config_paths + build_utils.GetPythonDependencies()) | 202 all_deps_config_paths + build_utils.GetPythonDependencies()) |
197 | 203 |
198 | 204 |
199 if __name__ == '__main__': | 205 if __name__ == '__main__': |
200 sys.exit(main(sys.argv[1:])) | 206 sys.exit(main(sys.argv[1:])) |
OLD | NEW |