-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
128 lines (106 loc) · 3.74 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
<project name="SassyBarista" default="compile" basedir=".">
<property name="javacc" value="/opt/javacc-5.0" />
<property name="src" value="src" />
<property name="testsrc" value="src/test" />
<property name="build" value="build" />
<property name="lib" value="lib" />
<property name="reports" value="reports" />
<property name="build.compiler" value="modern" />
<path id="cobertura.classpath">
<fileset dir="${lib}">
<include name="cobertura.jar" />
<include name="cobertura/**/*.jar" />
</fileset>
</path>
<target name="init">
<tstamp />
<mkdir dir="${build}" />
<mkdir dir="${build}/bin" />
<mkdir dir="${build}/src" />
<mkdir dir="${reports}" />
<mkdir dir="${reports}/raw" />
<mkdir dir="${reports}/html" />
</target>
<target name="codegeneration" depends="init">
<copy todir="${build}/src">
<fileset dir="${src}/java" />
</copy>
<javacc
target="${src}/java/net/quenchnetworks/sassybarista/sass/SassParser.jj"
outputdirectory="${build}/src/net/quenchnetworks/sassybarista/sass"
javacchome="${javacc}"
static="false"
/>
</target>
<target name="compile" depends="codegeneration">
<javac
srcdir="${build}/src"
destdir="${build}/bin"
debug="on"
target="1.6"
source="1.6"
includeantruntime="false"
debuglevel="lines,vars,source">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
<pathelement path="${build}/bin"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="clean" depends="init">
<delete dir="${build}"/>
<delete dir="${reports}"/>
</target>
<target name="compile-tests" depends="compile">
<javac
srcdir="${src}/test"
destdir="${build}/bin"
debug="on"
debuglevel="lines,vars,source">
<compilerarg value="-Xlint:unchecked"/>
<classpath>
<pathelement path="${build}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="run-tests" depends="compile-tests">
<junit printsummary="yes" haltonfailure="no" showoutput="yes" >
<classpath>
<pathelement path="${instrumented}"/>
<pathelement path="${build}/bin"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<batchtest fork="yes" todir="${reports}/raw/">
<formatter type="xml"/>
<fileset dir="${src}/test">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
</junit>
</target>
<target name="test" depends="run-tests">
<junitreport todir="${reports}">
<fileset dir="${reports}/raw/">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${reports}/html/"/>
</junitreport>
</target>
<target name="jar" depends="compile">
<jar destfile="sassybarista.jar">
<fileset dir="${build}/src"/>
<fileset dir="${build}/bin"/>
<manifest>
<attribute name="Main-Class" value="net.quenchnetworks.sassybarista.SassProcessor" />
</manifest>
</jar>
</target>
</project>