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

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

Issue 13107002: [Android] Allow Java libraries to access resources from dependencies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bettre spelling Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/java.gypi » ('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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 for res_dir in res_dirs: 77 for res_dir in res_dirs:
78 package_command += ['-S', res_dir] 78 package_command += ['-S', res_dir]
79 if options.non_constant_id: 79 if options.non_constant_id:
80 package_command.append('--non-constant-id') 80 package_command.append('--non-constant-id')
81 if options.custom_package: 81 if options.custom_package:
82 package_command += ['--custom-package', options.custom_package] 82 package_command += ['--custom-package', options.custom_package]
83 subprocess.check_call(package_command) 83 subprocess.check_call(package_command)
84 84
85 # Crunch image resources. This shrinks png files and is necessary for 9-patch 85 # Crunch image resources. This shrinks png files and is necessary for 9-patch
86 # images to display correctly. 86 # images to display correctly.
87 build_utils.MakeDirectory(options.crunch_output_dir)
87 subprocess.check_call([aapt, 88 subprocess.check_call([aapt,
88 'crunch', 89 'crunch',
89 '-S', options.crunch_input_dir, 90 '-S', options.crunch_input_dir,
90 '-C', options.crunch_output_dir]) 91 '-C', options.crunch_output_dir])
91 92
92 build_utils.Touch(options.stamp) 93 build_utils.Touch(options.stamp)
93 94
94 95
95 if __name__ == '__main__': 96 if __name__ == '__main__':
96 main() 97 main()
OLDNEW
« no previous file with comments | « no previous file | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698