This repository has been archived by the owner on Sep 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
116 lines (104 loc) · 3.4 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
<project name="MoePi" default="usage" xmlns:if="ant:if" xmlns:unless="ant:unless">
<property file="build.properties"/>
<!--
destdir property is used when installing v4l4j.jar, JNIlib and javadoc
It is a prefix that will be added before install paths
-->
<condition property="destdir" value="${DESTDIR}" else="">
<isset property="DESTDIR"/>
</condition>
<path id="build.classpath">
<pathelement location="${project.src}"/>
<fileset dir="${project.lib}">
<include name="*.jar"/>
<include name="**/*.jar"/>
</fileset>
</path>
<path id="test.classpath">
<pathelement location="${project.classes}" />
<fileset dir="${project.lib}">
<include name="*.jar"/>
</fileset>
</path>
<target name="usage">
<echo message=""/>
<echo message="MoePi | MOE 365"/>
<echo message=""/>
<echo message="Available targets:"/>
<echo message=" compile"/>
<echo message=" compile-debug"/>
<echo message=" jar"/>
<echo message=" jar-debug"/>
<echo message=" jar-src"/>
<echo message=" jar-full"/>
<echo message=" libs"/>
<echo message=" usage"/>
<echo message=" clean"/>
</target>
<target name="init">
<mkdir dir="${project.classes}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${project.src}" destdir="${project.classes}" deprecation="on" source="${source}" debug="off">
<classpath refid="build.classpath"/>
<include name="**/*.java" />
<exclude name="**/test/*.java" />
<exclude name="**/package-info.java" />
</javac>
<javac srcdir="${project.src}" destdir="${project.classes}" deprecation="on" source="${source}" debug="on">
<classpath refid="build.classpath"/>
<include name="**/test/*.java" />
<exclude name="**/package-info.java" />
</javac>
</target>
<target name="compile-debug" depends="init">
<javac srcdir="${project.src}" destdir="${project.classes}" deprecation="on" source="${source}" debug="on">
<classpath refid="build.classpath"/>
<include name="**/*.java"/>
<exclude name="**/package-info.java" />
</javac>
</target>
<target name="jar" depends="compile">
<jar jarfile="${project.dir}/${project.jar.file}">
<manifest>
<attribute name="Main-Class" value="com.moe365.mopi.Main"/>
</manifest>
<fileset dir="${project.classes}">
<include name="**"/>
<exclude name="com/moe365/mopi/test/"/>
</fileset>
</jar>
</target>
<target name="jar-debug" depends="compile-debug">
<jar jarfile="${project.dir}/${project.jar.file}">
<manifest>
<attribute name="Main-Class" value="com.moe365.mopi.Main"/>
</manifest>
<fileset dir="${project.classes}">
<include name="**"/>
<exclude name="com/moe365/mopi/test/"/>
</fileset>
</jar>
</target>
<target name="jar-src" depends="compile">
<jar jarfile="${project.dir}/${project.jar.file}">
<manifest>
<attribute name="Main-Class" value="com.moe365.mopi.Main"/>
</manifest>
<fileset dir="${project.classes}">
<include name="**"/>
<exclude name="com/moe365/mopi/test/"/>
</fileset>
<fileset dir="${project.src}">
<include name="**"/>
<exclude name="com/moe365/mopi/test/"/>
<exclude name="**/package-info.java"/>
</fileset>
</jar>
</target>
<target name="javadoc">
<javadoc sourcepath="${project.src}" packagenames="com.moe365.mopi.*" destdir="${project.javadoc.dir}" public="true" use="true" nodeprecated="true">
<excludepackage name="com.moe365.mopi.test"/>
</javadoc>
</target>
</project>