summaryrefslogtreecommitdiffstats
path: root/build/host_jar.gypi
diff options
context:
space:
mode:
authorraywilliams <raywilliams@google.com>2015-06-22 09:17:37 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-22 16:17:59 +0000
commit6ffb1179d6adf08edd64848b45b7415b6b6de43d (patch)
tree18fbe00ba29dae845f555ec1f266cb75693b45e0 /build/host_jar.gypi
parent50f6a89145b1e209ae464d95b1576a2a4116ac8a (diff)
downloadchromium_src-6ffb1179d6adf08edd64848b45b7415b6b6de43d.zip
chromium_src-6ffb1179d6adf08edd64848b45b7415b6b6de43d.tar.gz
chromium_src-6ffb1179d6adf08edd64848b45b7415b6b6de43d.tar.bz2
Add the Errorprone Java Compiler
These changes let the errorprone compiler find problems when building Android. A global flag disabled Errorprone by default. When enabled, code problems will be shown with suggestions on how to fix them. BUG=485599 Review URL: https://codereview.chromium.org/1136573002 Cr-Commit-Position: refs/heads/master@{#335509}
Diffstat (limited to 'build/host_jar.gypi')
-rw-r--r--build/host_jar.gypi27
1 files changed, 21 insertions, 6 deletions
diff --git a/build/host_jar.gypi b/build/host_jar.gypi
index 9c35177..a47f6bb 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',
+ ],
+ }],
]
}