-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
97 lines (87 loc) · 3.12 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
<project name="javasol" default="dist" basedir=".">
<property name="version" value="1.3"/>
<property name="src" value="src"/>
<property name="lib" value="lib"/>
<property name="properties" value="properties"/>
<property name="javadoc" value="doc/javadoc"/>
<property name="classes" value="classes"/>
<property name="dist" value="dist/javasol"/>
<property name="www" value="www"/>
<property name="build.compiler.emacs" value="true"/>
<path id="project.class.path">
<pathelement path="${classpath}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${classes}"/>
</path>
<target name="compile">
<mkdir dir="${classes}"/>
<javac srcdir="${src}" destdir="${classes}" deprecation="true" includeantruntime="false" debug="true">
<classpath refid="project.class.path"/>
</javac>
</target>
<target name="javadoc" depends="compile">
<javadoc sourcepath="${src}" destdir="${javadoc}" packagenames="com.*" author="true" version="true" use="true" package="true" windowtitle="KanaSensei API" doctitle="KanaSensei">
<classpath refid="project.class.path"/>
</javadoc>
</target>
<target name="dist" depends="compile">
<mkdir dir="${dist}/jar"/>
<jar jarfile="${dist}/jar/img.jar" basedir="img"/>
<jar jarfile="${dist}/jar/classes.jar" basedir="classes"/>
<jar jarfile="${dist}/jar/properties.jar" basedir="properties"/>
<copy todir="${dist}/jar">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</copy>
<copy todir="${dist}">
<fileset dir="${www}">
<include name="**/*.html"/>
<include name="**/*.png"/>
<include name="**/*.jpg"/>
</fileset>
<filelist dir="." files="license.txt"/>
</copy>
<antcall target="make-release-tar-gz"/>
<antcall target="make-standalone-jar"/>
</target>
<target name="make-release-tar-gz">
<tar destfile="${ant.project.name}-${version}.tar" basedir="${dist}"/>
<gzip destfile="${ant.project.name}-${version}.tar.gz" src="${ant.project.name}-${version}.tar"/>
<delete file="${ant.project.name}-${version}.tar"/>
</target>
<target name="make-standalone-jar">
<mkdir dir="tmp"/>
<copy todir="tmp">
<fileset dir="${classes}"/>
<fileset dir="img"/>
<fileset dir="${properties}"/>
</copy>
<unjar dest="tmp">
<fileset dir="${lib}">
<include name="**/*.jar"/>
</fileset>
</unjar>
<jar destfile="javasol-1.3.jar" basedir="tmp">
<manifest>
<attribute name="Main-Class" value="com.fbergeron.solitaire.Solitaire"/>
</manifest>
</jar>
<delete dir="tmp"/>
</target>
<target name="run" depends="dist">
<java classname="com.fbergeron.solitaire.Solitaire" fork="true">
<classpath>
<fileset dir="${dist}/jar">
<include name="**/*.jar"/>
</fileset>
</classpath>
</java>
</target>
<target name="clean">
<delete dir="${classes}"/>
<delete dir="dist"/>
</target>
</project>