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

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

Issue 1967153002: [Android] Run process_resources on aapt or sdk jar change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | build/android/gyp/process_resources.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 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 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 import optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 if options.excluded_classes: 69 if options.excluded_classes:
70 excluded_classes = build_utils.ParseGypList(options.excluded_classes) 70 excluded_classes = build_utils.ParseGypList(options.excluded_classes)
71 71
72 if options.strip_resource_classes_for: 72 if options.strip_resource_classes_for:
73 packages = build_utils.ParseGypList(options.strip_resource_classes_for) 73 packages = build_utils.ParseGypList(options.strip_resource_classes_for)
74 excluded_classes.extend(p.replace('.', '/') + '/' + f 74 excluded_classes.extend(p.replace('.', '/') + '/' + f
75 for p in packages for f in _RESOURCE_CLASSES) 75 for p in packages for f in _RESOURCE_CLASSES)
76 76
77 predicate = None 77 predicate = None
78 if excluded_classes: 78 if excluded_classes:
79 print excluded_classes
80 predicate = lambda f: not build_utils.MatchesGlob(f, excluded_classes) 79 predicate = lambda f: not build_utils.MatchesGlob(f, excluded_classes)
81 80
82 with build_utils.TempDir() as temp_dir: 81 with build_utils.TempDir() as temp_dir:
83 classes_dir = options.classes_dir 82 classes_dir = options.classes_dir
84 if options.input_jar: 83 if options.input_jar:
85 build_utils.ExtractAll(options.input_jar, temp_dir) 84 build_utils.ExtractAll(options.input_jar, temp_dir)
86 classes_dir = temp_dir 85 classes_dir = temp_dir
87 JarDirectory(classes_dir, options.jar_path, predicate=predicate) 86 JarDirectory(classes_dir, options.jar_path, predicate=predicate)
88 87
89 if options.stamp: 88 if options.stamp:
90 build_utils.Touch(options.stamp) 89 build_utils.Touch(options.stamp)
91 90
92 91
93 if __name__ == '__main__': 92 if __name__ == '__main__':
94 sys.exit(main()) 93 sys.exit(main())
95 94
OLDNEW
« no previous file with comments | « no previous file | build/android/gyp/process_resources.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698