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: |