forked from SpatialInteractive/9-patchedit
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
48 lines (42 loc) · 1.39 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
<project name="ninepatchedit" default="dist">
<target name="jarlauncher">
<ant dir="jarlauncher" target="dist"/>
<taskdef name="jarexec" classname="net.rcode.buildtools.JarExecTask">
<classpath>
<pathelement location="jarlauncher/build/dist/jarlauncher-ant.jar"/>
</classpath>
</taskdef>
</target>
<target name="clean">
<delete dir="build"/>
<ant dir="jarlauncher" target="clean"/>
</target>
<target name="compile">
<mkdir dir="build/classes"/>
<javac srcdir="src" destdir="build/classes" encoding="UTF-8" includeantruntime="false"
source="1.5" target="1.5" debug="true"/>
<copy todir="build/classes">
<fileset dir="src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="jar" depends="jarlauncher,compile">
<mkdir dir="build/dist"/>
<jar jarfile="build/dist/9pedit.jar" basedir="build/classes">
<manifest>
<attribute name="Main-Class" value="net.rcode.npedit.NinePatchEdit"/>
</manifest>
</jar>
<jarexec target="shell" source="build/dist/9pedit.jar" dest="build/dist/9pedit"/>
<chmod perm="a+x" file="build/dist/9pedit"/>
<jarexec target="exe" source="build/dist/9pedit.jar" dest="build/dist/9pedit.exe"/>
</target>
<target name="dist" depends="clean,jar">
<mkdir dir="dist"/>
<copy todir="dist">
<fileset dir="build/dist"/>
</copy>
<chmod perm="a+x" file="dist/9pedit"/>
</target>
</project>