Chromium Code Reviews| Index: build/android/gyp/javac.py |
| diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
| index 7b5264d3794f56996b7f478144c67a7a52fb0810..01b2d9bfb36a7c098e92440662fad942e2a6c141 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,13 @@ def _ParseOptions(argv): |
| java_srcjars += build_utils.ParseGypList(arg) |
| options.java_srcjars = java_srcjars |
| + additional_jar_files = [] |
| + if options.additional_jar_files: |
|
jbudorick
2016/07/21 00:12:41
optional nit: same
mikecase (-- gone --)
2016/07/21 16:32:37
ooh, I like this style. Done
|
| + 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) |