Skip to content

Commit 3f2ca43

Browse files
committed
Migrate the ant examples to use the -Xplugin integration
and delete the legacy ant compiler adapter. MOE_MIGRATED_REVID=209509256
1 parent 82b319c commit 3f2ca43

File tree

11 files changed

+37
-412
lines changed

11 files changed

+37
-412
lines changed

ant/pom.xml

Lines changed: 0 additions & 75 deletions
This file was deleted.

ant/src/main/java/com/google/errorprone/ErrorProneAntCompilerAdapter.java

Lines changed: 0 additions & 78 deletions
This file was deleted.

ant/src/main/java/com/google/errorprone/ErrorProneExternalCompilerAdapter.java

Lines changed: 0 additions & 127 deletions
This file was deleted.

examples/ant/ant_fork/build.xml

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/ant/ant_lib/build.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

examples/ant/ant_lib/src/Main.java

Lines changed: 0 additions & 23 deletions
This file was deleted.

examples/ant/build.xml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--
2+
Copyright 2018 The Error Prone Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
<project name="error prone example" default="compile">
17+
<target name="compile">
18+
<delete dir="build"/>
19+
<mkdir dir="build"/>
20+
21+
<property name="error_prone_core.jar" location="${user.home}/.m2/repository/com/google/errorprone/error_prone_core/2.3.2-SNAPSHOT/error_prone_core-2.3.2-SNAPSHOT-with-dependencies.jar"/>
22+
<property name="jformatstring.jar" location="${user.home}/.m2/repository/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar"/>
23+
<property name="javac.jar" location="${user.home}/.m2/repository/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar"/>
24+
25+
<!-- using github.com/google/error-prone-javac is required when running on JDK 8 -->
26+
<condition property="patch.javac" value="-XDempty" else="-J-Xbootclasspath/p:${javac.jar}">
27+
<javaversion atleast="9"/>
28+
</condition>
29+
30+
<javac srcdir="src" destdir="build" fork="yes" includeantruntime="no">
31+
<compilerarg value="${patch.javac}"/>
32+
<compilerarg line="-XDcompilePolicy=simple"/>
33+
<compilerarg line="-processorpath ${error_prone_core.jar}:${jformatstring.jar}"/>
34+
<compilerarg value="-Xplugin:ErrorProne -Xep:DeadException:ERROR" />
35+
</javac>
36+
</target>
37+
</project>

0 commit comments

Comments
 (0)