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

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

Issue 1452843002: Use hermetic timestamps in apkbuilder.py and refactor helper function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month 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 | « build/android/gyp/java_cpp_enum.py ('k') | build/android/gyp/util/build_utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/java_google_api_keys.py
diff --git a/build/android/gyp/java_google_api_keys.py b/build/android/gyp/java_google_api_keys.py
index 95257d36d92e423bd30e8e8d46bc2067d3b26ca8..62c92cd66b145000cbc1491d03f8ddf7d61b6b62 100755
--- a/build/android/gyp/java_google_api_keys.py
+++ b/build/android/gyp/java_google_api_keys.py
@@ -12,6 +12,8 @@ import string
import sys
import zipfile
+from util import build_utils
+
sys.path.append(
os.path.abspath(os.path.join(sys.path[0], '../../../google_apis')))
import google_api_keys
@@ -23,8 +25,6 @@ from pylib import constants
PACKAGE = 'org.chromium.chrome'
CLASSNAME = 'GoogleAPIKeys'
-HERMETIC_TIMESTAMP = (2001, 1, 1, 0, 0, 0)
-HERMETIC_FILE_ATTR = (0644 << 16L)
def GetScriptName():
@@ -84,10 +84,8 @@ def _DoWriteJarOutput(output_path, constant_definition):
os.makedirs(folder)
with zipfile.ZipFile(output_path, 'w') as srcjar:
path = '%s/%s' % (PACKAGE.replace('.', '/'), CLASSNAME + '.java')
- zipinfo = zipfile.ZipInfo(filename=path,
- date_time=HERMETIC_TIMESTAMP)
- zipinfo.external_attr = HERMETIC_FILE_ATTR
- srcjar.writestr(zipinfo, GenerateOutput(constant_definition))
+ data = GenerateOutput(constant_definition)
+ build_utils.AddToZipHermetic(srcjar, path, data=data)
def _DoMain(argv):
« no previous file with comments | « build/android/gyp/java_cpp_enum.py ('k') | build/android/gyp/util/build_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698