Index: build/android/gyp/javac.py |
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
index 3cce16dfb5b24caa3c9e0172be8aee89e9c9fa32..c4097e1c87be0c2812c0a26625e04a2b9de11c81 100755 |
--- a/build/android/gyp/javac.py |
+++ b/build/android/gyp/javac.py |
@@ -229,11 +229,13 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs): |
jar.JarDirectory(classes_dir, |
options.jar_path, |
predicate=inclusion_predicate, |
- provider_configurations=options.provider_configurations) |
+ provider_configurations=options.provider_configurations, |
+ additional_files=options.additional_jar_files) |
jar.JarDirectory(classes_dir, |
excluded_jar_path, |
predicate=exclusion_predicate, |
- provider_configurations=options.provider_configurations) |
+ provider_configurations=options.provider_configurations, |
+ additional_files=options.additional_jar_files) |
def _ParseOptions(argv): |
@@ -290,6 +292,13 @@ def _ParseOptions(argv): |
help='File to specify a service provider. Will be included ' |
'in the jar under META-INF/services.') |
parser.add_option( |
+ '--additional-jar-file', |
+ dest='additional_jar_files', |
+ action='append', |
+ help='Additional files to package into jar. By default, only Java .class ' |
+ 'files are packaged into the jar. Files should be specified in ' |
+ 'format <filename>:<path to be placed in jar>.') |
jbudorick
2016/06/09 19:42:00
Is there a better way to pass these in?
mikecase (-- gone --)
2016/06/09 22:46:29
So options:
1. Always put these additional files i
|
+ parser.add_option( |
'--chromium-code', |
type='int', |
help='Whether code being compiled should be built with stricter ' |
@@ -318,6 +327,13 @@ def _ParseOptions(argv): |
java_srcjars += build_utils.ParseGypList(arg) |
options.java_srcjars = java_srcjars |
+ additional_jar_files = [] |
+ if options.additional_jar_files: |
+ for arg in options.additional_jar_files: |
+ filepath, jar_filepath = arg.split(':') |
+ additional_jar_files.append((filepath, jar_filepath)) |
+ options.additional_jar_files = additional_jar_files |
+ |
if options.src_gendirs: |
options.src_gendirs = build_utils.ParseGypList(options.src_gendirs) |