-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
102 lines (91 loc) · 3.35 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
<?xml version="1.0"?>
<project name="Luvia" default="dist" basedir=".">
<property name="version" value="1.0" />
<property name="libcore" value="luvia-${version}" />
<property name="libphysics" value="luvia-physics${version}" />
<property name="src.dir" value="src/main/java" />
<property name="test.dir" value="src/test/java" />
<property name="build.dir" value="bin" />
<property name="lib.dir" value="libs"/>
<property name="reports.dir" value="tests"/>
<mkdir dir="${build.dir}" />
<target name="dist" depends="clean, package"/>
<target name="clean">
<delete includeemptydirs="true" >
<fileset dir="${build.dir}">
<exclude name="**/assets/*"/>
<exclude name="**/assets/**"/>
</fileset>
</delete>
</target>
<target name="init">
<mkdir dir="${build.dir}" />
</target>
<target name="compile">
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false" source="1.7" target="1.7" debug="off">
<classpath>
<pathelement path="${classpath}" />
<fileset dir="${lib.dir}">
<include name="abby*.jar"/>
<include name="etyllica*.jar"/>
<include name="gluegen-rt.jar"/>
<include name="jogl-all.jar"/>
</fileset>
</classpath>
</javac>
<copy todir="${build.dir}">
<fileset dir="${src.dir}" excludes="**/*.java"/>
</copy>
</target>
<target name="compile-tests">
<javac srcdir="${test.dir}" destdir="${build.dir}" includeantruntime="false" source="1.7" target="1.7" debug="off">
<classpath>
<fileset dir="${reports.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="package" depends="init, compile">
<jar destfile="${lib.dir}/${libcore}.jar">
<fileset dir="${build.dir}">
<include name="**/br/com/luvia/*"/>
<include name="**/br/com/luvia/**"/>
<include name="**/org/lwjgl/*"/>
<include name="**/org/lwjgl/**"/>
<include name="**/org/jogamp/*"/>
<include name="**/org/jogamp/**"/>
<include name="**/com/badlogic/*"/>
<include name="**/com/badlogic/**"/>
<exclude name="**/com/badlogic/gdx/assets/*"/>
<exclude name="**/com/badlogic/gdx/assets/**"/>
<exclude name="**/com/badlogic/gdx/graphics/*"/>
<exclude name="**/com/badlogic/gdx/graphics/**"/>
</fileset>
</jar>
<jar destfile="${lib.dir}/${libphysics}.jar">
<fileset dir="${build.dir}">
<include name="**/javax/*"/>
<include name="**/javax/**"/>
<include name="**/com/bulletphysics/*"/>
<include name="**/com/bulletphysics/**"/>
</fileset>
</jar>
</target>
<target name="test" depends="init, compile, compile-tests">
<junit printsummary="yes" haltonfailure="yes" showoutput="true">
<classpath>
<pathelement location="${build.dir}"/>
<fileset dir="${reports.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
<batchtest>
<fileset dir="${test.dir}">
<include name="**/*Test*.java"/>
</fileset>
</batchtest>
<formatter type="brief" usefile="false"/>
</junit>
</target>
</project>