| OLD | NEW |
| 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 fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| 11 | 11 |
| 12 from util import build_utils |
| 12 from util import md5_check | 13 from util import md5_check |
| 13 | 14 |
| 14 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') | |
| 15 sys.path.append(BUILD_ANDROID_DIR) | |
| 16 | |
| 17 from pylib import build_utils | |
| 18 | |
| 19 | 15 |
| 20 def DoJar(options): | 16 def DoJar(options): |
| 21 class_files = build_utils.FindInDirectory(options.classes_dir, '*.class') | 17 class_files = build_utils.FindInDirectory(options.classes_dir, '*.class') |
| 22 for exclude in build_utils.ParseGypList(options.excluded_classes): | 18 for exclude in build_utils.ParseGypList(options.excluded_classes): |
| 23 class_files = filter( | 19 class_files = filter( |
| 24 lambda f: not fnmatch.fnmatch(f, exclude), class_files) | 20 lambda f: not fnmatch.fnmatch(f, exclude), class_files) |
| 25 | 21 |
| 26 jar_path = os.path.abspath(options.jar_path) | 22 jar_path = os.path.abspath(options.jar_path) |
| 27 | 23 |
| 28 # The paths of the files in the jar will be the same as they are passed in to | 24 # The paths of the files in the jar will be the same as they are passed in to |
| (...skipping 29 matching lines...) Expand all Loading... |
| 58 | 54 |
| 59 DoJar(options) | 55 DoJar(options) |
| 60 | 56 |
| 61 if options.stamp: | 57 if options.stamp: |
| 62 build_utils.Touch(options.stamp) | 58 build_utils.Touch(options.stamp) |
| 63 | 59 |
| 64 | 60 |
| 65 if __name__ == '__main__': | 61 if __name__ == '__main__': |
| 66 sys.exit(main(sys.argv)) | 62 sys.exit(main(sys.argv)) |
| 67 | 63 |
| OLD | NEW |