-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.xml
executable file
·99 lines (84 loc) · 3.18 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
<project name="dmxP512" default="dist">
<property name="version" value="0.1.3"/>
<property name="name" value="dmxP512"/>
<property name="build" value="build/"/>
<property name="source" value="source/"/>
<property name="library" value="library"/>
<property name="dist" value="dist"/>
<property name="lib" value="lib"/>
<path id="libs">
<fileset dir="${lib}/">
<include name="core.jar"/>
<include name="serial.jar"/>
</fileset>
</path>
<target name="clean" description="Clean bin.">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="clean" description="compile the application">
<delete dir="${build}"/>
<mkdir dir="${build}"/>
<javac srcdir="${source}" destdir="${build}" debug="true" source="1.6" target="1.6" encoding="UTF-8" deprecation="on">
<classpath refid="libs"/>
</javac>
</target>
<target name="package" depends="compile" description="create jar">
<jar jarfile="${library}/${name}.jar" basedir="${build}"/>
<delete dir="${build}"/>
</target>
<target name="javadoc" depends="compile" description="">
<javadoc packagenames="dmxP512.*"
sourcepath="source"
defaultexcludes="yes"
destdir="documentation/javadoc"
author="true"
version="true"
use="true"
windowtitle="dmxP512 API">
<doctitle><![CDATA[<h1>dmxP512 API</h1>]]></doctitle>
<tag name="todo" scope="all" description="To do:"/>
<tag name="fixme" scope="all" description="fix me:"/>
<classpath refid="libs"/>
</javadoc>
</target>
<target name="dist" depends="package, javadoc" description="create jar">
<delete dir="temp"/>
<mkdir dir="temp"/>
<mkdir dir="temp/${name}/documentation"/>
<mkdir dir="temp/${name}/library"/>
<mkdir dir="temp/${name}/source/${name}"/>
<mkdir dir="temp/${name}/examples"/>
<copy todir="temp/${name}/documentation">
<fileset dir="documentation"/>
</copy>
<copy todir="temp/${name}/examples">
<fileset dir="examples"/>
</copy>
<copy todir="temp/${name}/source/${name}">
<fileset dir="source/${name}"/>
</copy>
<copy todir="temp/${name}/library/">
<fileset dir="library"/>
</copy>
<copy todir="temp/${name}/">
<fileset file="library.properties"/>
</copy>
<delete dir="${dist}"/>
<mkdir dir="${dist}"/>
<zip destfile="${dist}/${name}-${version}.zip" basedir="temp/"/>
<zip destfile="${dist}/${name}.zip" basedir="temp/"/>
<copy todir="dist/">
<fileset file="library.properties"/>
</copy>
<rename src="dist/library.properties" dest="dist/dmxP512.txt"/>
<delete dir="temp"/>
<copy todir="${dist}/javadoc">
<fileset dir="documentation/javadoc"/>
</copy>
<copy todir="${dist}/">
<fileset file="examples/examples.pde"/>
<fileset file="documentation/release_notes.txt"/>
<fileset file="documentation/index.html"/>
</copy>
</target>
</project>