Index: build/android/gyp/dex.py |
diff --git a/build/android/dex.py b/build/android/gyp/dex.py |
similarity index 71% |
rename from build/android/dex.py |
rename to build/android/gyp/dex.py |
index 00c2c527422bc96788ad7f2e8d0f8f1910fb46e8..69d3d96ac29d0b00e58c905cf276104edf9cab4d 100755 |
--- a/build/android/dex.py |
+++ b/build/android/gyp/dex.py |
@@ -9,13 +9,26 @@ import optparse |
import os |
import sys |
+from util import md5_check |
+ |
+BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') |
+sys.path.append(BUILD_ANDROID_DIR) |
+ |
from pylib import build_utils |
Yaron
2013/04/03 22:05:35
Is build_utils moving to the gyp dir in another pa
cjhopman
2013/04/03 22:17:56
Yes.
|
def DoDex(options, paths): |
dx_binary = os.path.join(options.android_sdk_root, 'platform-tools', 'dx') |
dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths |
- build_utils.CheckCallDie(dex_cmd) |
+ |
+ md5_stamp = '%s.md5' % options.dex_path |
+ md5_checker = md5_check.Md5Checker( |
+ stamp=md5_stamp, inputs=paths, command=dex_cmd) |
+ if md5_checker.IsStale(): |
+ build_utils.CheckCallDie(dex_cmd) |
+ else: |
+ build_utils.Touch(options.dex_path) |
+ md5_checker.Write() |
def main(argv): |