Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1106)

Unified Diff: third_party/errorprone/errorprone.gyp

Issue 1286613002: Update errorprone to fix java 8 issues. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed jbudorick's nits. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/errorprone/errorprone.gyp
diff --git a/third_party/errorprone/errorprone.gyp b/third_party/errorprone/errorprone.gyp
index 6a1c5db7e73149cb99197526d5d7bbae58163f03..90235feb0e2582104a35629035cb22c3512b5243 100644
--- a/third_party/errorprone/errorprone.gyp
+++ b/third_party/errorprone/errorprone.gyp
@@ -3,13 +3,49 @@
# found in the LICENSE file.
{
+ 'variables': {
+ 'errorprone_script_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone',
+ },
'targets': [
{
- # GN: //third_party/errorprone:errorprone_java
- 'target_name': 'errorprone_java',
+ # GN: //third_party/errorprone:error_prone_annotation_java
+ 'target_name': 'error_prone_annotation_jar',
'type': 'none',
'variables': {
- 'jar_path': 'lib/error_prone_core-1.1.2.jar',
+ 'jar_path': 'lib/error_prone_annotation-2.0.1.jar',
+ },
+ 'includes': [
+ '../../build/host_prebuilt_jar.gypi',
+ ]
+ },
+ {
+ # GN: //third_party/errorprone:error_prone_annotations_java
+ 'target_name': 'error_prone_annotations_jar',
+ 'type': 'none',
+ 'variables': {
+ 'jar_path': 'lib/error_prone_annotations-2.0.1.jar',
+ },
+ 'includes': [
+ '../../build/host_prebuilt_jar.gypi',
+ ]
+ },
+ {
+ # GN: //third_party/errorprone:javacutil_java
+ 'target_name': 'javacutil_jar',
+ 'type': 'none',
+ 'variables': {
+ 'jar_path': 'lib/javacutil-1.8.10.jar',
+ },
+ 'includes': [
+ '../../build/host_prebuilt_jar.gypi',
+ ]
+ },
+ {
+ # GN: //third_party/errorprone:dataflow_java
+ 'target_name': 'dataflow_jar',
+ 'type': 'none',
+ 'variables': {
+ 'jar_path': 'lib/dataflow-1.8.10.jar',
},
'includes': [
'../../build/host_prebuilt_jar.gypi',
@@ -20,17 +56,18 @@
'target_name': 'chromium_errorprone',
'type': 'none',
'variables': {
- 'src_paths': [
- 'src/org/chromium/errorprone/ChromiumErrorProneCompiler.java',
- ],
- 'enable_errorprone': 0,
+ 'jar_path': 'lib/error_prone_core-2.0.1.jar',
},
'dependencies': [
'../../build/android/setup.gyp:sun_tools_java',
- 'errorprone_java',
+ '../../third_party/findbugs/findbugs.gyp:format_string_jar',
+ 'error_prone_annotation_jar',
+ 'error_prone_annotations_jar',
+ 'javacutil_jar',
+ 'dataflow_jar',
],
'includes': [
- '../../build/host_jar.gypi',
+ '../../build/host_prebuilt_jar.gypi',
],
'actions': [
{
@@ -42,14 +79,38 @@
'<(jar_path)',
],
'outputs': [
- '<(PRODUCT_DIR)/bin.java/chromium_errorprone'
+ '<(errorprone_script_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/create_java_binary_script.py',
'--output', '<(PRODUCT_DIR)/bin.java/chromium_errorprone',
- '--classpath=>@(input_jars_paths)',
'--jar-path=<(jar_path)',
- '--main-class=org.chromium.errorprone.ChromiumErrorProneCompiler',
+ '--classpath=>@(input_jars_paths)',
+ '--main-class=com.google.errorprone.ErrorProneCompiler',
+ ],
+ },
+ ],
+ },
+ {
+ # This emulates gn's datadeps fields. We don't want the errorprone jars
+ # to be added to the classpaths of targets that depend on errorprone.
+ 'target_name': 'require_errorprone',
+ 'type': 'none',
+ 'actions': [
+ {
+ 'action_name': 'require_errorprone',
+ 'message': 'Making sure errorprone has been built.',
+ 'variables': {
+ 'required_file': '<(PRODUCT_DIR)/bin.java/errorprone.required',
+ },
+ 'inputs': [
+ '<(errorprone_script_path)',
+ ],
+ 'outputs': [
+ '<(required_file)',
+ ],
+ 'action': [
+ 'python', '../../build/android/gyp/touch.py', '<(required_file)',
],
},
],

Powered by Google App Engine
This is Rietveld 408576698