Index: build/host_jar.gypi |
diff --git a/build/host_jar.gypi b/build/host_jar.gypi |
index 9c35177872ce92e36fe42e872a2c55798e0b4d5d..a47f6bbdd99dd215b5375a9c6dcc47437522e696 100644 |
--- a/build/host_jar.gypi |
+++ b/build/host_jar.gypi |
@@ -53,6 +53,8 @@ |
'jar_path': '<(jar_dir)/<(jar_name)', |
'main_class%': '', |
'stamp': '<(intermediate_dir)/jar.stamp', |
+ 'enable_errorprone%': '0', |
+ 'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', |
}, |
'all_dependent_settings': { |
'variables': { |
@@ -64,18 +66,25 @@ |
'action_name': 'javac_<(_target_name)', |
'message': 'Compiling <(_target_name) java sources', |
'variables': { |
- 'extra_options': [], |
+ 'extra_args': [], |
+ 'extra_inputs': [], |
'java_sources': [ '<!@(find <@(src_paths) -name "*.java")' ], |
'conditions': [ |
['"<(excluded_src_paths)" != ""', { |
'java_sources!': ['<!@(find <@(excluded_src_paths) -name "*.java")'] |
}], |
['"<(jar_excluded_classes)" != ""', { |
- 'extra_options': ['--jar-excluded-classes=<(jar_excluded_classes)'] |
+ 'extra_args': ['--jar-excluded-classes=<(jar_excluded_classes)'] |
}], |
['main_class != ""', { |
- 'extra_options': ['--main-class=>(main_class)'] |
- }] |
+ 'extra_args': ['--main-class=>(main_class)'] |
+ }], |
+ ['enable_errorprone == 1', { |
+ 'extra_inputs': [ |
+ '<(errorprone_exe_path)', |
+ ], |
+ 'extra_args': [ '--use-errorprone-path=<(errorprone_exe_path)' ], |
+ }], |
], |
}, |
'inputs': [ |
@@ -83,6 +92,7 @@ |
'<(DEPTH)/build/android/gyp/javac.py', |
'^@(java_sources)', |
'>@(input_jars_paths)', |
+ '<@(extra_inputs)', |
], |
'outputs': [ |
'<(jar_path)', |
@@ -95,7 +105,7 @@ |
'--chromium-code=<(chromium_code)', |
'--stamp=<(stamp)', |
'--jar-path=<(jar_path)', |
- '<@(extra_options)', |
+ '<@(extra_args)', |
'^@(java_sources)', |
], |
}, |
@@ -125,7 +135,12 @@ |
] |
} |
] |
- }] |
+ }], |
+ ['enable_errorprone == 1', { |
+ 'dependencies': [ |
+ '<(DEPTH)/third_party/errorprone/errorprone.gyp:chromium_errorprone', |
+ ], |
+ }], |
] |
} |