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

Unified Diff: build/android/gyp/util/build_utils.py

Issue 525533003: Add content_shell_test_apk and a several dependencies (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-content-shell-apk
Patch Set: Created 6 years, 3 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 | « build/android/gyp/create_dist_jar.py ('k') | build/android/gyp/write_build_config.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/util/build_utils.py
diff --git a/build/android/gyp/util/build_utils.py b/build/android/gyp/util/build_utils.py
index ddb3cb52a356a940fd5ff63b61243f1068b023c4..e3a3525e52e92295c9be5d52bb95766db3156e3c 100644
--- a/build/android/gyp/util/build_utils.py
+++ b/build/android/gyp/util/build_utils.py
@@ -232,6 +232,22 @@ def ZipDir(output, base_dir):
outfile.write(path, archive_path)
+def MergeZips(output, inputs, exclude_patterns=None):
+ def Allow(name):
+ if exclude_patterns is not None:
+ for p in exclude_patterns:
+ if fnmatch.fnmatch(name, p):
+ return False
+ return True
+
+ with zipfile.ZipFile(output, 'w') as out_zip:
+ for in_file in inputs:
+ with zipfile.ZipFile(in_file, 'r') as in_zip:
+ for name in in_zip.namelist():
+ if Allow(name):
+ out_zip.writestr(name, in_zip.read(name))
+
+
def PrintWarning(message):
print 'WARNING: ' + message
« no previous file with comments | « build/android/gyp/create_dist_jar.py ('k') | build/android/gyp/write_build_config.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698