| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # | 2 # |
| 3 # Copyright 2016 The Chromium Authors. All rights reserved. | 3 # Copyright 2016 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 argparse | 7 import argparse |
| 8 import os | 8 import os |
| 9 import shutil | 9 import shutil |
| 10 import sys | 10 import sys |
| 11 import tempfile | 11 import tempfile |
| 12 | 12 |
| 13 from util import build_utils | 13 from util import build_utils |
| 14 | 14 |
| 15 | 15 |
| 16 _SRC_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), | 16 _SRC_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), |
| 17 '..', '..', '..')) | 17 '..', '..', '..')) |
| 18 _RETROLAMBDA_JAR_PATH = os.path.normpath(os.path.join( | 18 _RETROLAMBDA_JAR_PATH = os.path.normpath(os.path.join( |
| 19 _SRC_ROOT, 'third_party', 'retrolambda', 'retrolambda-2.3.0.jar')) | 19 _SRC_ROOT, 'third_party', 'retrolambda', 'retrolambda-2.5.1.jar')) |
| 20 | 20 |
| 21 | 21 |
| 22 def _OnStaleMd5(input_jar, output_jar, classpath, android_sdk_jar): | 22 def _OnStaleMd5(input_jar, output_jar, classpath, android_sdk_jar): |
| 23 with build_utils.TempDir() as temp_dir: | 23 with build_utils.TempDir() as temp_dir: |
| 24 build_utils.ExtractAll(input_jar, path=temp_dir) | 24 build_utils.ExtractAll(input_jar, path=temp_dir) |
| 25 cmd = [ | 25 cmd = [ |
| 26 'java', | 26 'java', |
| 27 '-Dretrolambda.inputDir=' + temp_dir, | 27 '-Dretrolambda.inputDir=' + temp_dir, |
| 28 '-Dretrolambda.classpath=' + | 28 '-Dretrolambda.classpath=' + |
| 29 ':'.join([temp_dir] + classpath + [android_sdk_jar]), | 29 ':'.join([temp_dir] + classpath + [android_sdk_jar]), |
| (...skipping 29 matching lines...) Expand all Loading... |
| 59 lambda: _OnStaleMd5(options.input_jar, options.output_jar, | 59 lambda: _OnStaleMd5(options.input_jar, options.output_jar, |
| 60 options.classpath, options.android_sdk_jar), | 60 options.classpath, options.android_sdk_jar), |
| 61 options, | 61 options, |
| 62 input_paths=input_paths, | 62 input_paths=input_paths, |
| 63 input_strings=[], | 63 input_strings=[], |
| 64 output_paths=output_paths) | 64 output_paths=output_paths) |
| 65 | 65 |
| 66 | 66 |
| 67 if __name__ == '__main__': | 67 if __name__ == '__main__': |
| 68 sys.exit(main()) | 68 sys.exit(main()) |
| OLD | NEW |