Index: build/android/gyp/jar.py |
diff --git a/build/android/gyp/jar.py b/build/android/gyp/jar.py |
index 17f968c3e893044e44e0babea896b7e55fddbe88..48abf5edb7d41491c7524cdb9a414c8565394033 100755 |
--- a/build/android/gyp/jar.py |
+++ b/build/android/gyp/jar.py |
@@ -27,16 +27,20 @@ def Jar(class_files, classes_dir, jar_path, manifest_file=None): |
jar_cmd.append(os.path.abspath(manifest_file)) |
jar_cmd.extend(class_files_rel) |
- record_path = '%s.md5.stamp' % jar_path |
- md5_check.CallAndRecordIfStale( |
- lambda: build_utils.CheckOutput(jar_cmd, cwd=jar_cwd), |
- record_path=record_path, |
- input_paths=class_files, |
- input_strings=jar_cmd, |
- force=not os.path.exists(jar_path), |
- ) |
- |
- build_utils.Touch(jar_path, fail_if_missing=True) |
+ with build_utils.TempDir() as temp_dir: |
+ empty_file = os.path.join(temp_dir, '.empty') |
+ build_utils.Touch(empty_file) |
+ jar_cmd.append(os.path.relpath(empty_file, jar_cwd)) |
mef
2015/06/03 21:56:27
This results in files like ../../tmpPrZEqC/.empty
|
+ record_path = '%s.md5.stamp' % jar_path |
+ md5_check.CallAndRecordIfStale( |
+ lambda: build_utils.CheckOutput(jar_cmd, cwd=jar_cwd), |
+ record_path=record_path, |
+ input_paths=class_files, |
+ input_strings=jar_cmd, |
+ force=not os.path.exists(jar_path), |
+ ) |
+ |
+ build_utils.Touch(jar_path, fail_if_missing=True) |
def JarDirectory(classes_dir, excluded_classes, jar_path, manifest_file=None): |