Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2816)

Unified Diff: build/android/gyp/jar.py

Issue 1127233005: Don't include tested apks resources in test apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/gyp/jar_toc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « no previous file | build/android/gyp/jar_toc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698