Tamas Kenez | f2ee2a3 | 2017-06-21 10:30:20 +0200 | [diff] [blame] | 1 | #!/usr/bin/env python |
| 2 | # Copyright (c) 2017, the R8 project authors. Please see the AUTHORS file |
| 3 | # for details. All rights reserved. Use of this source code is governed by a |
| 4 | # BSD-style license that can be found in the LICENSE file. |
| 5 | |
| 6 | # Run ProGuard, Google's internal version |
| 7 | |
| 8 | from __future__ import print_function |
| 9 | import os |
| 10 | import subprocess |
| 11 | import sys |
| 12 | |
| 13 | import utils |
| 14 | |
| 15 | PROGUARD_JAR = os.path.join(utils.REPO_ROOT, 'third_party', 'proguard', |
| 16 | 'proguard_internal_159423826', 'ProGuard_deploy.jar') |
| 17 | |
| 18 | def run(args): |
| 19 | cmd = ['java', '-jar', PROGUARD_JAR] |
| 20 | cmd.extend(args) |
| 21 | print('-- ' + ' '.join(cmd)) |
| 22 | subprocess.check_call(cmd) |
| 23 | |
| 24 | def Main(): |
| 25 | run(sys.argv[1:]) |
| 26 | |
| 27 | if __name__ == '__main__': |
| 28 | sys.exit(Main()) |