forked from dkomanov/fizteh-java-2014
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
60 lines (49 loc) · 1.95 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
<project name="fizteh-java-2014" 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.8" target="1.8" 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="lib/checkstyle-5.9-SNAPSHOT-all.jar"/>
<checkstyle
config="lib/checkstyle-rules.xml"
failureProperty="run.checkstyle.failure"
failOnViolation="false"
>
<formatter type="plain"/>
<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>