-
Notifications
You must be signed in to change notification settings - Fork 63
/
build.xml
59 lines (48 loc) · 1.91 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
<project name="fizteh-java-2013" default="compile">
<property name="out" location="${basedir}/out"/>
<property name="jars" location="${basedir}/jars"/>
<target name="init">
<mkdir dir="${out}"/>
</target>
<path id="fizteh.sourcepath">
<path location="${basedir}/src"/>
</path>
<path id="fizteh.classpath">
<fileset dir="${basedir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="compile" depends="init">
<javac destdir="${out}" encoding="UTF-8" debug="true" source="1.7" target="1.7" includeAntRuntime="false" nowarn="on" deprecation="off">
<classpath refid="fizteh.classpath"/>
<src refid="fizteh.sourcepath"/>
<include name="**/*.java"/>
</javac>
</target>
<target name="dist" depends="compile">
<jar jarfile="${jars}/fizteh.jar" basedir="${out}"/>
</target>
<target name="checkstyle" depends="dist, run.checkstyle">
<fail if="run.checkstyle.failure"/>
</target>
<target name="run.checkstyle" description="Checkstyle utility (code conventions)">
<taskdef resource="checkstyletask.properties" classpath="bin/checkstyle-5.6-all.jar"/>
<checkstyle
config="bin/checkstyle-rules.xml"
failureProperty="run.checkstyle.failure"
failOnViolation="false"
>
<formatter type="xml" tofile="${out}/checkstyle-report.xml"/>
<classpath>
<path refid="fizteh.classpath"/>
<path location="${jars}/fizteh.jar"/>
</classpath>
<fileset dir="${basedir}/src" includes="**/*.java"/>
</checkstyle>
<fail message="There are CheckStyle warnings" if="run.checkstyle.failure"/>
</target>
<target name="clean">
<delete dir="${out}"/>
<delete dir="${jars}"/>
</target>
</project>