OLD | NEW |
---|---|
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 { | 5 { |
6 'variables': { | |
7 'errorprone_script_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
8 }, | |
6 'targets': [ | 9 'targets': [ |
7 { | 10 { |
8 # GN: //third_party/errorprone:errorprone_java | 11 # GN: //third_party/errorprone:error_prone_annotation_java |
9 'target_name': 'errorprone_java', | 12 'target_name': 'error_prone_annotation_jar', |
10 'type': 'none', | 13 'type': 'none', |
11 'variables': { | 14 'variables': { |
12 'jar_path': 'lib/error_prone_core-1.1.2.jar', | 15 'jar_path': 'lib/error_prone_annotation-2.0.1.jar', |
13 }, | 16 }, |
14 'includes': [ | 17 'includes': [ |
15 '../../build/host_prebuilt_jar.gypi', | 18 '../../build/host_prebuilt_jar.gypi', |
19 ] | |
20 }, | |
21 { | |
22 # GN: //third_party/errorprone:error_prone_annotations_java | |
23 'target_name': 'error_prone_annotations_jar', | |
24 'type': 'none', | |
25 'variables': { | |
26 'jar_path': 'lib/error_prone_annotations-2.0.1.jar', | |
27 }, | |
28 'includes': [ | |
29 '../../build/host_prebuilt_jar.gypi', | |
30 ] | |
31 }, | |
32 { | |
33 # GN: //third_party/errorprone:javacutil_java | |
34 'target_name': 'javacutil_jar', | |
35 'type': 'none', | |
36 'variables': { | |
37 'jar_path': 'lib/javacutil-1.8.10.jar', | |
38 }, | |
39 'includes': [ | |
40 '../../build/host_prebuilt_jar.gypi', | |
41 ] | |
42 }, | |
43 { | |
44 # GN: //third_party/errorprone:dataflow_java | |
45 'target_name': 'dataflow_jar', | |
46 'type': 'none', | |
47 'variables': { | |
48 'jar_path': 'lib/dataflow-1.8.10.jar', | |
49 }, | |
50 'includes': [ | |
51 '../../build/host_prebuilt_jar.gypi', | |
16 ] | 52 ] |
17 }, | 53 }, |
18 { | 54 { |
19 # GN: //third_party/errorprone:chromium_errorprone | 55 # GN: //third_party/errorprone:chromium_errorprone |
20 'target_name': 'chromium_errorprone', | 56 'target_name': 'chromium_errorprone', |
21 'type': 'none', | 57 'type': 'none', |
22 'variables': { | 58 'variables': { |
23 'src_paths': [ | 59 'jar_path': 'lib/error_prone_core-2.0.1.jar', |
24 'src/org/chromium/errorprone/ChromiumErrorProneCompiler.java', | |
25 ], | |
26 'enable_errorprone': 0, | |
27 }, | 60 }, |
28 'dependencies': [ | 61 'dependencies': [ |
29 '../../build/android/setup.gyp:sun_tools_java', | 62 '../../build/android/setup.gyp:sun_tools_java', |
30 'errorprone_java', | 63 '../../third_party/findbugs/findbugs.gyp:format_string_jar', |
64 ':error_prone_annotation_jar', | |
jbudorick
2015/08/25 19:53:58
nit: while this may work, we don't typically do le
| |
65 ':error_prone_annotations_jar', | |
66 ':javacutil_jar', | |
67 ':dataflow_jar', | |
31 ], | 68 ], |
32 'includes': [ | 69 'includes': [ |
33 '../../build/host_jar.gypi', | 70 '../../build/host_prebuilt_jar.gypi', |
34 ], | 71 ], |
35 'actions': [ | 72 'actions': [ |
36 { | 73 { |
37 'action_name': 'create_errorprone_binary_script', | 74 'action_name': 'create_errorprone_binary_script', |
38 'inputs': [ | 75 'inputs': [ |
39 '<(DEPTH)/build/android/gyp/create_java_binary_script.py', | 76 '<(DEPTH)/build/android/gyp/create_java_binary_script.py', |
40 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 77 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
41 # Ensure that the script is touched when the jar is. | 78 # Ensure that the script is touched when the jar is. |
42 '<(jar_path)', | 79 '<(jar_path)', |
43 ], | 80 ], |
44 'outputs': [ | 81 'outputs': [ |
45 '<(PRODUCT_DIR)/bin.java/chromium_errorprone' | 82 '<(errorprone_script_path)', |
46 ], | 83 ], |
47 'action': [ | 84 'action': [ |
48 'python', '<(DEPTH)/build/android/gyp/create_java_binary_script.py', | 85 'python', '<(DEPTH)/build/android/gyp/create_java_binary_script.py', |
49 '--output', '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | 86 '--output', '<(PRODUCT_DIR)/bin.java/chromium_errorprone', |
87 '--jar-path=<(jar_path)', | |
50 '--classpath=>@(input_jars_paths)', | 88 '--classpath=>@(input_jars_paths)', |
51 '--jar-path=<(jar_path)', | 89 '--main-class=com.google.errorprone.ErrorProneCompiler', |
52 '--main-class=org.chromium.errorprone.ChromiumErrorProneCompiler', | |
53 ], | 90 ], |
54 }, | 91 }, |
55 ], | 92 ], |
93 }, | |
94 { | |
95 # This emulates gn's datadeps fields. We don't want the errorprone jars | |
96 # to be added to the classpaths of targets that depend on errorprone. | |
97 'target_name': 'require_errorprone', | |
98 'type': 'none', | |
99 'actions': [ | |
100 { | |
101 'action_name': 'require_errorprone', | |
102 'message': 'Making sure errorprone has been built.', | |
103 'variables': { | |
104 'required_file': '<(PRODUCT_DIR)/bin.java/errorprone.required', | |
105 }, | |
106 'inputs': [ | |
107 '<(errorprone_script_path)', | |
108 ], | |
109 'outputs': [ | |
110 '<(required_file)', | |
111 ], | |
112 'action': [ | |
113 'python', '../../build/android/gyp/touch.py', '<(required_file)', | |
114 ], | |
115 }, | |
116 ], | |
56 }, | 117 }, |
57 ], | 118 ], |
58 } | 119 } |
OLD | NEW |