| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2015 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 """Generate ResourceRewriter.java which overwrites the given package's | 7 """Generate ResourceRewriter.java which overwrites the given package's |
| 8 resource id. | 8 resource id. |
| 9 """ | 9 """ |
| 10 | 10 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 temp_dir) | 88 temp_dir) |
| 89 | 89 |
| 90 | 90 |
| 91 def main(): | 91 def main(): |
| 92 options = ParseArgs(build_utils.ExpandFileArgs(sys.argv[1:])) | 92 options = ParseArgs(build_utils.ExpandFileArgs(sys.argv[1:])) |
| 93 package = options.package_name | 93 package = options.package_name |
| 94 if options.output_dir: | 94 if options.output_dir: |
| 95 output_dir = os.path.join(options.output_dir, *package.split('.')) | 95 output_dir = os.path.join(options.output_dir, *package.split('.')) |
| 96 CreateResourceRewriter( | 96 CreateResourceRewriter( |
| 97 package, | 97 package, |
| 98 build_utils.ParseGypList(options.dep_packages), | 98 build_utils.ParseGnList(options.dep_packages), |
| 99 output_dir) | 99 output_dir) |
| 100 else: | 100 else: |
| 101 CreateResourceRewriterSrcjar( | 101 CreateResourceRewriterSrcjar( |
| 102 package, | 102 package, |
| 103 build_utils.ParseGypList(options.dep_packages), | 103 build_utils.ParseGnList(options.dep_packages), |
| 104 options.srcjar) | 104 options.srcjar) |
| 105 | 105 |
| 106 return 0 | 106 return 0 |
| 107 | 107 |
| 108 if __name__ == '__main__': | 108 if __name__ == '__main__': |
| 109 sys.exit(main()) | 109 sys.exit(main()) |
| 110 | 110 |
| OLD | NEW |