forked from mapeditor/tiled-java
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
123 lines (110 loc) · 4.29 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
117
118
119
120
121
122
123
<project name="Tiled" default="dist">
<description>
A Java-based Tile Map Editor
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="plugins" location="plugins"/>
<property name="nightly" location="nightly"/>
<property name="javadoc" location="docs/api"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="release_bin" depends="clean,dist" description="Build binary release">
<mkdir dir="releases"/>
<zip destfile="releases/tiled-${version}-bin.zip">
<zipfileset prefix="tiled-${version}" dir="."
includes="README COPYING INSTALL CHANGES TODO"/>
<zipfileset fullpath="tiled-${version}/tiled.jar" dir="dist"
includes="tiled.jar"/>
<zipfileset prefix="tiled-${version}/plugins" dir="dist/plugins"/>
<zipfileset prefix="tiled-${version}/examples" dir="examples"/>
</zip>
</target>
<target name="release_src" depends="clean" description="Build source release">
<mkdir dir="releases"/>
<zip destfile="releases/tiled-${version}-src.zip">
<zipfileset prefix="tiled-${version}/src" dir="src"/>
<zipfileset prefix="tiled-${version}/plugins" dir="plugins"/>
<zipfileset prefix="tiled-${version}" dir="."
includes="README COPYING CHANGES TODO build.xml MANIFEST.MF"/>
<zipfileset prefix="tiled-${version}/examples" dir="examples"/>
</zip>
</target>
<target name="compile" depends="init" description="Compile the source">
<javac source="1.5" target="1.5" srcdir="${src}" destdir="${build}"/>
<copy todir="${build}/tiled/mapeditor/resources">
<fileset dir="./src/tiled/mapeditor/resources">
<include name="*.png" />
<include name="*.properties" />
<include name="map.dtd" />
</fileset>
</copy>
</target>
<target name="compile_dep" depends="init" description="Compile the source">
<javac source="1.5" target="1.5" srcdir="${src}" destdir="${build}"
deprecation="on"/>
<copy todir="${build}/tiled/mapeditor/resources">
<fileset dir="./src/tiled/mapeditor/resources">
<include name="*.png" />
<include name="map.dtd" />
</fileset>
</copy>
</target>
<target name="dist" depends="compile" description="Generate the distribution">
<mkdir dir="${dist}"/>
<jar
jarfile="${dist}/tiled.jar"
manifest="MANIFEST.MF"
basedir="${build}"
excludes="tiled/plugins/**"
/>
<ant dir="plugins" target="dist"/>
</target>
<target name="core" depends="compile"
description="Generate a core I/O distribution for use in games, etc.">
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/tiled-core.jar"
basedir="${build}" includes="tiled/core/**/*.class,tiled/io/**,tiled/mapeditor/Resources.class,tiled/mapeditor/util/cutter/**,tiled/util/Util.class,tiled/util/Base64.class,tiled/util/NumberedSet.class,tiled/mapeditor/util/TransparentImageFilter.class,tiled/mapeditor/resources/map.dtd"/>
</target>
<target name="dist_dep" depends="compile_dep"
description="Generate the distribution and warn about deprecation">
<mkdir dir="${dist}"/>
<jar
jarfile="${dist}/tiled.jar"
manifest="MANIFEST.MF"
basedir="${build}"
/>
</target>
<target name="nightly" depends="compile" description="Generate a nightly build">
<mkdir dir="${nightly}"/>
<jar
jarfile="${nightly}/tiled-${DSTAMP}.jar"
manifest="MANIFEST.MF"
basedir="${build}"
/>
</target>
<target name="clean" description="Clean up the build directory" >
<delete dir="${build}"/>
<ant dir="${plugins}" target="clean" inheritAll="false"/>
</target>
<target name="javadoc" description="Generate Javadoc">
<!-- Clean up previous Javadoc files -->
<delete dir="${javadoc}"/>
<!-- Generate Javadoc -->
<javadoc
packagenames="tiled.*"
sourcepath="src"
destdir="${javadoc}"
windowtitle="Tiled"
/>
</target>
<target name="plugins" description="Plugins for various map formats">
<ant dir="${plugins}" target="dist" inheritAll="false"/>
</target>
</project>