forked from typetools/checker-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
221 lines (195 loc) · 6.71 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!--
This is a configuration file for use by Ant when building the
Checker Framework.
This top-level build file simply delegates to the subprojects.
It assumes that the "checker" project is aware of all dependencies
and that it is sufficient to run targets from there.
Each subproject builds its own Javadoc including the documentation
of all projects it in turn depends on. This would allow us to
easily ship each subproject independently. Subprojects that
already ship independently also build a Javadoc JAR file
containing all its documentation.
-->
<project name="checkerframework" default="dist"
basedir=".">
<property file="${basedir}/local.properties"/>
<property name="checkerframework" value="${basedir}"/>
<property file="${checkerframework}/build-common.properties"/>
<target name="dist"
description="Compile and jar all subprojects">
<ant dir="checker">
<target name="dist"/>
</ant>
</target>
<target name="dist-nobuildjdk"
description="Rebuild the framework. Rebuild checker on top of framework without rebuilding the JDK">
<ant dir="framework">
<target name="clean"/>
<target name="dist"/>
</ant>
<ant dir="checker">
<target name="dist-nobuildjdk"/>
</ant>
</target>
<target name="build"
description="Compile all subprojects">
<ant dir="checker">
<target name="build"/>
</ant>
</target>
<target name="clean"
description="Clean all subprojects">
<ant dir="checker">
<target name="clean"/>
</ant>
</target>
<target name="tests" depends="dist"
description="Run test cases for all subprojects">
<ant dir="checker">
<target name="all-tests"/>
</ant>
</target>
<target name="tests-nojtreg" depends="dist"
description="Run test cases for all subprojects, except jtreg tests">
<ant dir="checker">
<target name="all-tests-nojtreg"/>
</ant>
</target>
<target name="tests-nobuildjdk" depends="dist-nobuildjdk"
description="Run test cases for all subprojects (without rebuilding the JDK)">
<ant dir="checker">
<target name="all-tests-nobuildjdk"/>
</ant>
</target>
<target name="tests-nojtreg-nobuildjdk" depends="dist-nobuildjdk"
description="Run test cases for all subprojects, except jtreg tests (without rebuilding the JDK)">
<ant dir="checker">
<target name="all-tests-nojtreg-nobuildjdk"/>
</ant>
</target>
<target name="javadoc"
description="Generate javadoc for all subprojects">
<ant dir="checker">
<target name="javadoc"/>
</ant>
<ant dir="dataflow">
<target name="javadoc"/>
</ant>
<ant dir="framework">
<target name="javadoc"/>
</ant>
<ant dir="javacutil">
<target name="javadoc"/>
</ant>
</target>
<target name="javadoc-private"
description="Generate javadoc, inculding private classes/members, for all subprojects">
<ant dir=".">
<property name="javadoc.private" value="true"/>
<target name="javadoc"/>
</ant>
</target>
<target name="dist-release">
<ant dir="checker">
<target name="dist-release"/>
</ant>
<ant dir="javacutil">
<target name="sources-jar"/>
</ant>
<ant dir="javacutil">
<target name="javadoc-jar" />
</ant>
<ant dir="dataflow">
<target name="sources-jar"/>
</ant>
<ant dir="dataflow">
<target name="javadoc-jar" />
</ant>
</target>
<!-- Like dist-release, but skips CF tests which take a long time to run. -->
<target name="dist-release-notest">
<ant dir="checker">
<target name="dist-release-notest"/>
</ant>
<ant dir="javacutil">
<target name="sources-jar"/>
</ant>
<ant dir="javacutil">
<target name="javadoc-jar" />
</ant>
<ant dir="dataflow">
<target name="sources-jar"/>
</ant>
<ant dir="dataflow">
<target name="javadoc-jar" />
</ant>
</target>
<target name="html-validate"
description="Validate that HTML files are well-formed; requires JDK 8">
<exec executable="html5validator" failonerror="true">
<arg value="--ignore"/>
<arg value="/api/"/>
<arg value="/build/"/>
<arg value="/docs/manual/manual.html"/>
<arg value="/checker/jdk/nullness/src/java/lang/ref/package.html"/>
</exec>
</target>
<fileset id="formatted.java.files" dir="."
includes="**/*.java"
excludes="checker/jdk/,checker/tests/nullness-javac-errors/,framework/tests/whole-program-inference/annotated/"/>
<import file="./build-styleguide.xml"/>
<!-- I tried using a fileset like this: <fileset
id="errorprone.java.files" dir="." includes="**/*.java"
excludes="**/javacutil/dist/**"/> but didn't find a way to get
the javac target to use it. Instead, I now use separate
properties. -->
<property name="errorprone.project.includes" value="**/*.java"/>
<property name="errorprone.project.excludes" value="**/javacutil/dist/**"/>
<property name="errorprone.project.classpath" value="${javac.lib}:${annotation-file-utilities.lib}:${stubparser.lib}:${junit.lib}:${hamcrest.lib}"/>
<!-- Instead of direct references to `src` this should use `${src}`.
This seems stupid and we should remove the `${src}` property or
introduce e.g. a `${framework.src.loc} property. -->
<property name="errorprone.project.srcdir" value="${framework.loc}/src:${dataflow.loc}/src:${javacutil.loc}/src:${checker.loc}/src"/>
<import file="./build-errorprone.xml"/>
<target name="tags"
description="Generate TAGS file">
<ant dir="checker">
<target name="tags"/>
</ant>
<ant dir="dataflow">
<target name="tags"/>
</ant>
<ant dir="framework">
<target name="tags"/>
</ant>
<ant dir="javacutil">
<target name="tags"/>
</ant>
<exec executable="make" dir="docs/manual" failonerror="true">
<arg value="tags"/>
</exec>
<exec executable="etags" failonerror="true">
<arg value="-i"/>
<arg value="checker/TAGS"/>
<arg value="-i"/>
<arg value="dataflow/TAGS"/>
<arg value="-i"/>
<arg value="framework/TAGS"/>
<arg value="-i"/>
<arg value="javacutil/TAGS"/>
<arg value="-i"/>
<arg value="docs/manual/TAGS"/>
</exec>
</target>
<target name="clean-tags"
description="Remove TAGS files">
<exec executable="rm" failonerror="false">
<arg value="-f"/>
<arg value="checker/TAGS"/>
<arg value="dataflow/TAGS"/>
<arg value="framework/TAGS"/>
<arg value="javacutil/TAGS"/>
<arg value="docs/manual/TAGS"/>
</exec>
</target>
</project>