-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
69 lines (61 loc) · 2.42 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
<project name="BabaIsYou" default="all" basedir=".">
<!-- Define project properties -->
<property name="app.name" value="baba"/>
<property name="java.version" value="21"/>
<property name="src.dir" value="src"/>
<property name="resources.dir" value="resources"/>
<property name="build.dir" value="classes"/>
<property name="dist.dir" value="dist"/>
<property name="lib.dir" value="lib"/>
<property name="docs.dir" value="docs/doc"/>
<property name="main.class" value="fr.esiee.baba.controller.Game"/>
<path id="classpath">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<!-- Clean up directories and files -->
<target name="clean">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${docs.dir}"/>
<delete file="${app.name}.jar"/>
<delete file="MANIFEST.MF"/>
</target>
<!-- Create necessary directories and manifest file -->
<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<mkdir dir="${docs.dir}"/>
<manifest file="MANIFEST.MF">
<attribute name="Main-Class" value="${main.class}"/>
<attribute name="Class-Path" value="lib/zen-6.0.jar"/>
</manifest>
</target>
<!-- Compile source files -->
<target name="compile" depends="init">
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
<classpath refid="classpath"/>
</javac>
</target>
<!-- Copy resource files -->
<target name="copy-resources" depends="compile">
<copy todir="${build.dir}">
<fileset dir="${resources.dir}" includes="**/*"/>
</copy>
</target>
<!-- Create JAR file -->
<target name="jar" depends="copy-resources">
<jar destfile="${dist.dir}/${app.name}.jar" basedir="${build.dir}" manifest="MANIFEST.MF">
<zipgroupfileset dir="${lib.dir}" includes="*.jar"/>
</jar>
</target>
<!-- Generate Javadoc -->
<target name="javadoc" depends="init">
<javadoc sourcepath="${src.dir}" destdir="${docs.dir}" failonerror="false">
<classpath refid="classpath"/>
<arg value="-quiet"/>
</javadoc>
</target>
<!-- Clean, compile, copy resources, create JAR, and generate Javadoc -->
<target name="all" depends="clean, compile, copy-resources, jar, javadoc"/>
</project>