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

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

Issue 1181613005: Extend unknown_deps for build_configs exemption to android_resources. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn2
Patch Set: Created 5 years, 6 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if options.supports_android and not options.dex_path: 174 if options.supports_android and not options.dex_path:
175 raise Exception('java_library that supports Android requires a dex path.') 175 raise Exception('java_library that supports Android requires a dex path.')
176 176
177 if options.requires_android and not options.supports_android: 177 if options.requires_android and not options.supports_android:
178 raise Exception( 178 raise Exception(
179 '--supports-android is required when using --requires-android') 179 '--supports-android is required when using --requires-android')
180 180
181 possible_deps_config_paths = build_utils.ParseGypList( 181 possible_deps_config_paths = build_utils.ParseGypList(
182 options.possible_deps_configs) 182 options.possible_deps_configs)
183 183
184 allow_unknown_deps = options.type == 'android_apk' 184 allow_unknown_deps = (options.type == 'android_apk' or
185 options.type == 'android_resources')
185 unknown_deps = [ 186 unknown_deps = [
186 c for c in possible_deps_config_paths if not os.path.exists(c)] 187 c for c in possible_deps_config_paths if not os.path.exists(c)]
187 if unknown_deps and not allow_unknown_deps: 188 if unknown_deps and not allow_unknown_deps:
188 raise Exception('Unknown deps: ' + str(unknown_deps)) 189 raise Exception('Unknown deps: ' + str(unknown_deps))
189 190
190 direct_deps_config_paths = [ 191 direct_deps_config_paths = [
191 c for c in possible_deps_config_paths if not c in unknown_deps] 192 c for c in possible_deps_config_paths if not c in unknown_deps]
192 193
193 deps = Deps(direct_deps_config_paths) 194 deps = Deps(direct_deps_config_paths)
194 direct_library_deps = deps.Direct('java_library') 195 direct_library_deps = deps.Direct('java_library')
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 build_utils.WriteJson(config, options.build_config, only_if_changed=True) 348 build_utils.WriteJson(config, options.build_config, only_if_changed=True)
348 349
349 if options.depfile: 350 if options.depfile:
350 build_utils.WriteDepfile( 351 build_utils.WriteDepfile(
351 options.depfile, 352 options.depfile,
352 deps.AllConfigPaths() + build_utils.GetPythonDependencies()) 353 deps.AllConfigPaths() + build_utils.GetPythonDependencies())
353 354
354 355
355 if __name__ == '__main__': 356 if __name__ == '__main__':
356 sys.exit(main(sys.argv[1:])) 357 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