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

Side by Side Diff: build/android/process_resources.py

Issue 13334003: Push native libraries separately when gyp manages install (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apkinstall
Patch Set: Created 7 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 | « build/android/gyp/push_libraries.py ('k') | build/android/pylib/build_utils.py » ('j') | 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 (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 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 """Process Android library resources to generate R.java and crunched images.""" 7 """Process Android library resources to generate R.java and crunched images."""
8 8
9 import optparse 9 import optparse
10 import os 10 import os
(...skipping 27 matching lines...) Expand all
38 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. 38 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
39 parser.add_option('--ignore', help='this argument is ignored') 39 parser.add_option('--ignore', help='this argument is ignored')
40 (options, args) = parser.parse_args() 40 (options, args) = parser.parse_args()
41 41
42 if args: 42 if args:
43 parser.error('No positional arguments should be given.') 43 parser.error('No positional arguments should be given.')
44 44
45 # Check that required options have been provided. 45 # Check that required options have been provided.
46 required_options = ('android_sdk', 'android_sdk_tools', 'R_dir', 'res_dirs', 46 required_options = ('android_sdk', 'android_sdk_tools', 'R_dir', 'res_dirs',
47 'crunch_input_dir', 'crunch_output_dir') 47 'crunch_input_dir', 'crunch_output_dir')
48 for option_name in required_options: 48 build_utils.CheckOptions(options, parser, required=required_options)
49 if not getattr(options, option_name):
50 parser.error('--%s is required' % option_name.replace('_', '-'))
51 49
52 return options 50 return options
53 51
54 52
55 def main(): 53 def main():
56 options = ParseArgs() 54 options = ParseArgs()
57 android_jar = os.path.join(options.android_sdk, 'android.jar') 55 android_jar = os.path.join(options.android_sdk, 'android.jar')
58 aapt = os.path.join(options.android_sdk_tools, 'aapt') 56 aapt = os.path.join(options.android_sdk_tools, 'aapt')
59 57
60 build_utils.MakeDirectory(options.R_dir) 58 build_utils.MakeDirectory(options.R_dir)
(...skipping 29 matching lines...) Expand all
90 '-S', options.crunch_input_dir, 88 '-S', options.crunch_input_dir,
91 '-C', options.crunch_output_dir] 89 '-C', options.crunch_output_dir]
92 build_utils.CheckCallDie(aapt_cmd) 90 build_utils.CheckCallDie(aapt_cmd)
93 91
94 if options.stamp: 92 if options.stamp:
95 build_utils.Touch(options.stamp) 93 build_utils.Touch(options.stamp)
96 94
97 95
98 if __name__ == '__main__': 96 if __name__ == '__main__':
99 main() 97 main()
OLDNEW
« no previous file with comments | « build/android/gyp/push_libraries.py ('k') | build/android/pylib/build_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698