Index: build/android/gyp/javac.py |
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
index 5722fb1d97a72dfbd63d8b9d1d94c5f7ca69c62e..3cce16dfb5b24caa3c9e0172be8aee89e9c9fa32 100755 |
--- a/build/android/gyp/javac.py |
+++ b/build/android/gyp/javac.py |
@@ -228,10 +228,12 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs): |
jar.JarDirectory(classes_dir, |
options.jar_path, |
- predicate=inclusion_predicate) |
+ predicate=inclusion_predicate, |
+ provider_configurations=options.provider_configurations) |
jar.JarDirectory(classes_dir, |
excluded_jar_path, |
- predicate=exclusion_predicate) |
+ predicate=exclusion_predicate, |
+ provider_configurations=options.provider_configurations) |
def _ParseOptions(argv): |
@@ -272,6 +274,22 @@ def _ParseOptions(argv): |
default='', |
help='List of .class file patterns to exclude from the jar.') |
parser.add_option( |
+ '--processor', |
+ dest='processors', |
+ action='append', |
+ help='Annotation processor to use.') |
+ parser.add_option( |
+ '--processor-arg', |
+ dest='processor_args', |
+ action='append', |
+ help='key=value arguments for the annotation processors.') |
+ parser.add_option( |
+ '--provider-configuration', |
+ dest='provider_configurations', |
+ action='append', |
+ help='File to specify a service provider. Will be included ' |
+ 'in the jar under META-INF/services.') |
+ parser.add_option( |
'--chromium-code', |
type='int', |
help='Whether code being compiled should be built with stricter ' |
@@ -350,6 +368,12 @@ def main(argv): |
# trigger a compile warning or error. |
javac_cmd.extend(['-XDignore.symbol.file']) |
+ if options.processors: |
+ javac_cmd.extend(['-processor', ','.join(options.processors)]) |
+ if options.processor_args: |
+ for arg in options.processor_args: |
+ javac_cmd.extend(['-A%s' % arg]) |
+ |
classpath_inputs = options.bootclasspath |
if options.classpath: |
if options.classpath[0].endswith('.interface.jar'): |