OLD | NEW |
| (Empty) |
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 | |
3 # found in the LICENSE file. | |
4 | |
5 { | |
6 'variables': { | |
7 'errorprone_script_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
8 }, | |
9 'targets': [ | |
10 { | |
11 # GN: //third_party/errorprone:error_prone_annotation_java | |
12 'target_name': 'error_prone_annotation_jar', | |
13 'type': 'none', | |
14 'variables': { | |
15 'jar_path': 'lib/error_prone_annotation-2.0.5.jar', | |
16 }, | |
17 'includes': [ | |
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.5.jar', | |
27 }, | |
28 'includes': [ | |
29 '../../build/host_prebuilt_jar.gypi', | |
30 ] | |
31 }, | |
32 { | |
33 # GN: //third_party/errorprone:dataflow_java | |
34 'target_name': 'dataflow_jar', | |
35 'type': 'none', | |
36 'variables': { | |
37 'jar_path': 'lib/dataflow-1.8.10.jar', | |
38 }, | |
39 'includes': [ | |
40 '../../build/host_prebuilt_jar.gypi', | |
41 ] | |
42 }, | |
43 { | |
44 # GN: //third_party/errorprone:javacutil_java | |
45 'target_name': 'javacutil_jar', | |
46 'type': 'none', | |
47 'variables': { | |
48 'jar_path': 'lib/javacutil-1.8.10.jar', | |
49 }, | |
50 'includes': [ | |
51 '../../build/host_prebuilt_jar.gypi', | |
52 ] | |
53 }, | |
54 { | |
55 # GN: //third_party/errorprone:javac_java | |
56 'target_name': 'javac_jar', | |
57 'type': 'none', | |
58 'variables': { | |
59 'jar_path': 'lib/javac-1.9.0-dev-r2644-1.jar', | |
60 }, | |
61 'includes': [ | |
62 '../../build/host_prebuilt_jar.gypi', | |
63 ] | |
64 }, | |
65 { | |
66 # GN: //third_party/errorprone:chromium_errorprone | |
67 'target_name': 'chromium_errorprone', | |
68 'type': 'none', | |
69 'variables': { | |
70 'jar_path': 'lib/error_prone_core-2.0.5.jar', | |
71 }, | |
72 'dependencies': [ | |
73 '../../third_party/findbugs/findbugs.gyp:format_string_jar', | |
74 'error_prone_annotation_jar', | |
75 'error_prone_annotations_jar', | |
76 'dataflow_jar', | |
77 'javac_jar', | |
78 'javacutil_jar', | |
79 ], | |
80 'includes': [ | |
81 '../../build/host_prebuilt_jar.gypi', | |
82 ], | |
83 'actions': [ | |
84 { | |
85 'action_name': 'create_errorprone_binary_script', | |
86 'inputs': [ | |
87 '<(DEPTH)/build/android/gyp/create_java_binary_script.py', | |
88 '<(DEPTH)/build/android/gyp/util/build_utils.py', | |
89 # Ensure that the script is touched when the jar is. | |
90 '<(jar_path)', | |
91 ], | |
92 'outputs': [ | |
93 '<(errorprone_script_path)', | |
94 ], | |
95 'action': [ | |
96 'python', '<(DEPTH)/build/android/gyp/create_java_binary_script.py', | |
97 '--output', '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | |
98 # TODO(mikecase): Remove this extra arg when the bots are on jdk8 or
higher. | |
99 '--bootclasspath', '<(PRODUCT_DIR)/lib.java/javac_jar.jar', | |
100 '--jar-path=<(jar_path)', | |
101 '--classpath=>@(input_jars_paths)', | |
102 '--main-class=com.google.errorprone.ErrorProneCompiler', | |
103 ], | |
104 }, | |
105 ], | |
106 }, | |
107 { | |
108 # This emulates gn's datadeps fields. We don't want the errorprone jars | |
109 # to be added to the classpaths of targets that depend on errorprone. | |
110 'target_name': 'require_errorprone', | |
111 'type': 'none', | |
112 'actions': [ | |
113 { | |
114 'action_name': 'require_errorprone', | |
115 'message': 'Making sure errorprone has been built.', | |
116 'variables': { | |
117 'required_file': '<(PRODUCT_DIR)/bin.java/errorprone.required', | |
118 }, | |
119 'inputs': [ | |
120 '<(errorprone_script_path)', | |
121 ], | |
122 'outputs': [ | |
123 '<(required_file)', | |
124 ], | |
125 'action': [ | |
126 'python', '../../build/android/gyp/touch.py', '<(required_file)', | |
127 ], | |
128 }, | |
129 ], | |
130 }, | |
131 ], | |
132 } | |
OLD | NEW |