Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: build/android/gyp/write_build_config.py

Issue 1083413010: Fix GN build for junit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 if options.type == 'android_resources' or options.type == 'android_apk': 213 if options.type == 'android_resources' or options.type == 'android_apk':
214 config['resources'] = {} 214 config['resources'] = {}
215 config['resources']['dependency_zips'] = [ 215 config['resources']['dependency_zips'] = [
216 c['resources_zip'] for c in all_resources_deps] 216 c['resources_zip'] for c in all_resources_deps]
217 config['resources']['extra_package_names'] = [] 217 config['resources']['extra_package_names'] = []
218 218
219 if options.type == 'android_apk': 219 if options.type == 'android_apk':
220 config['resources']['extra_package_names'] = [ 220 config['resources']['extra_package_names'] = [
221 c['package_name'] for c in all_resources_deps if 'package_name' in c] 221 c['package_name'] for c in all_resources_deps if 'package_name' in c]
222 222
223 if options.type in ['android_apk', 'deps_dex']:
224 deps_dex_files = [c['dex_path'] for c in all_library_deps]
223 225
224 deps_dex_files = [c['dex_path'] for c in all_library_deps]
225 # An instrumentation test apk should exclude the dex files that are in the apk 226 # An instrumentation test apk should exclude the dex files that are in the apk
226 # under test. 227 # under test.
227 if options.type == 'android_apk' and options.tested_apk_config: 228 if options.type == 'android_apk' and options.tested_apk_config:
228 tested_apk_config_paths = GetAllDepsConfigsInOrder( 229 tested_apk_config_paths = GetAllDepsConfigsInOrder(
229 [options.tested_apk_config]) 230 [options.tested_apk_config])
230 tested_apk_configs = [GetDepConfig(p) for p in tested_apk_config_paths] 231 tested_apk_configs = [GetDepConfig(p) for p in tested_apk_config_paths]
231 tested_apk_library_deps = DepsOfType('java_library', tested_apk_configs) 232 tested_apk_library_deps = DepsOfType('java_library', tested_apk_configs)
232 tested_apk_deps_dex_files = [c['dex_path'] for c in tested_apk_library_deps] 233 tested_apk_deps_dex_files = [c['dex_path'] for c in tested_apk_library_deps]
233 deps_dex_files = [ 234 deps_dex_files = [
234 p for p in deps_dex_files if not p in tested_apk_deps_dex_files] 235 p for p in deps_dex_files if not p in tested_apk_deps_dex_files]
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 build_utils.WriteJson(config, options.build_config, only_if_changed=True) 276 build_utils.WriteJson(config, options.build_config, only_if_changed=True)
276 277
277 if options.depfile: 278 if options.depfile:
278 build_utils.WriteDepfile( 279 build_utils.WriteDepfile(
279 options.depfile, 280 options.depfile,
280 all_deps_config_paths + build_utils.GetPythonDependencies()) 281 all_deps_config_paths + build_utils.GetPythonDependencies())
281 282
282 283
283 if __name__ == '__main__': 284 if __name__ == '__main__':
284 sys.exit(main(sys.argv[1:])) 285 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698