-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
executable file
·62 lines (53 loc) · 2.07 KB
/
build.xml
File metadata and controls
executable file
·62 lines (53 loc) · 2.07 KB
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
<project>
<property environment="env" />
<path id="classpath">
<fileset dir="./lib" includes="**/*.jar" />
</path>
<path id="scalatest.classpath">
<pathelement location="test/build"/>
<pathelement location="lib/*.jar"/>
<pathelement location="test/lib/scalatest-1.2.jar"/>
<pathelement location="test/lib/scalatest-1.2.jar"/>
<pathelement location="test/lib/scala-library.jar"/>
<pathelement location="test/mocks/mocks.jar"/>
<pathelement location="jar/octobot.jar"/>
</path>
<target name="clean">
<delete dir="build" />
<delete dir="test/build" />
<delete dir="jar" />
</target>
<target name="compile" depends="clean">
<mkdir dir="build" />
<javac srcdir="src/" destdir="build" classpathref="classpath" debug="on" debuglevel="lines,vars,source">
<compilerarg value="-Xlint"/>
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="jar" />
<manifest file="MANIFEST.MF">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Main-Class" value="com.urbanairship.octobot.Octobot"/>
</manifest>
<jar destfile="jar/octobot.jar" basedir="build" includes="**/*.class" manifest="MANIFEST.MF">
<zipgroupfileset dir="lib" includes="*.jar"/>
</jar>
</target>
<target name="compile_tests" depends="jar">
<mkdir dir="test/build" />
<exec executable="/bin/sh">
<arg value="-c" />
<arg value="scalac -cp jar/octobot.jar:test/lib/scalatest-1.2.jar:lib/json_simple-1.1.jar test/specs/*.scala -d test/build" />
</exec>
</target>
<target name="test" depends="compile_tests">
<mkdir dir="build" />
<taskdef name="scalatest" classname="org.scalatest.tools.ScalaTestAntTask">
<classpath refid="scalatest.classpath"/>
</taskdef>
<scalatest>
<suite classname="SettingsSpec" />
<suite classname="TaskSpec" />
</scalatest>
</target>
</project>