Index: build/android/gyp/javac.py |
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
index 7b5264d3794f56996b7f478144c67a7a52fb0810..818f011d9e4a908b8abfec4a52fd29eec9ef5a88 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>.') |
+ parser.add_option( |
'--chromium-code', |
type='int', |
help='Whether code being compiled should be built with stricter ' |
@@ -318,6 +327,12 @@ def _ParseOptions(argv): |
java_srcjars += build_utils.ParseGypList(arg) |
options.java_srcjars = java_srcjars |
+ additional_jar_files = [] |
+ for arg in options.additional_jar_files or []: |
+ 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) |