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

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

Issue 1679623002: Create dist jars only for instrumentation apks; use ijars for them (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/util/build_utils.py » ('j') | build/android/gyp/util/build_utils.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/create_dist_jar.py
diff --git a/build/android/gyp/create_dist_jar.py b/build/android/gyp/create_dist_jar.py
index 0d31c5db93f5c8329df40842871719b843d3848d..3f056a7a411cc853db8a0ff842f2f77fb1af5900 100755
--- a/build/android/gyp/create_dist_jar.py
+++ b/build/android/gyp/create_dist_jar.py
@@ -7,6 +7,7 @@
"""Merges a list of jars into a single jar."""
import optparse
+import re
import sys
from util import build_utils
@@ -16,6 +17,8 @@ def main(args):
parser = optparse.OptionParser()
build_utils.AddDepfileOption(parser)
parser.add_option('--output', help='Path to output jar.')
+ parser.add_option('--use-ijars', action='store_true',
jbudorick 2016/02/08 16:24:12 If we only use dist jars for instrumentation test
agrieve 2016/02/08 16:42:01 GYP doesn't create interface jars.
+ help='Use .interface.jar rather than the given jars.')
parser.add_option('--inputs', action='append', help='List of jar inputs.')
options, _ = parser.parse_args(args)
build_utils.CheckOptions(options, parser, ['output', 'inputs'])
@@ -24,6 +27,10 @@ def main(args):
for inputs_arg in options.inputs:
input_jars.extend(build_utils.ParseGypList(inputs_arg))
+ if options.use_ijars:
+ ijar_re = re.compile(r'\.jar$')
+ input_jars = [ijar_re.sub('.interface.jar', p) for p in input_jars]
+
build_utils.MergeZips(options.output, input_jars)
if options.depfile:
« no previous file with comments | « no previous file | build/android/gyp/util/build_utils.py » ('j') | build/android/gyp/util/build_utils.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698