forked from DrTon/FlightPlot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
67 lines (59 loc) · 2.94 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="FlightPlot" default="all">
<path id="libsclasspath">
<fileset dir="lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="all" description="Do the entire build" depends="flightplot"/>
<target name="make_dirs" description="Make dirs">
<mkdir dir="out/production/FlightPlot"/>
</target>
<path id="javac2.class.path">
<pathelement location="lib/forms_rt.jar"/>
<pathelement location="lib/javac2.jar"/>
<pathelement location="lib/annotations.jar"/>
<pathelement location="lib/asm4-all.jar"/>
<pathelement location="lib/jdom.jar"/>
<pathelement location="lib/AppleJavaExtensions.jar"/>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.class.path"/>
<target name="compile" description="Compile java sources" depends="make_dirs">
<javac2 destdir="out/production/FlightPlot" includeantruntime="false" debug="true" target="1.6" source="1.6">
<classpath refid="libsclasspath"/>
<src path="src"/>
<src path="jMAVlib/src"/>
<src path="la4j/src/main/java"/>
</javac2>
</target>
<target name="flightplot" description="Link classes and JARs for FlightPlot" depends="compile">
<jar id="flightplot" jarfile="out/production/flightplot.jar">
<manifest>
<attribute name="Main-Class" value="me.drton.flightplot.FlightPlot"/>
</manifest>
<fileset dir="out/production/FlightPlot">
<include name="**/*.class"/>
</fileset>
<zipgroupfileset dir="lib" includes="jfreechart-*.jar"/>
<zipgroupfileset dir="lib" includes="jcommon-*.jar"/>
<zipgroupfileset dir="lib" includes="forms_rt.jar"/>
</jar>
</target>
<taskdef name="jarbundler" classpath="lib/jarbundler-2.2.0.jar" classname="net.sourceforge.jarbundler.JarBundler"/>
<target name="flightplot_mac_os_app" description="Build FlightPlot Mac OS X app" depends="flightplot">
<jarbundler dir="out/production" name="FlightPlot" mainclass="me.drton.flightplot.FlightPlot"
jar="out/production/flightplot.jar" version="0.2.11"
vmoptions="-Dapple.eawt.quitStrategy=CLOSE_ALL_WINDOWS"
stubfile="lib/JavaApplicationStub"
/>
</target>
<target name="zip_artifacts" description="Zip build artifacts for distribution" depends="flightplot_mac_os_app">
<zip destfile="out/production/flightplot.jar.zip" basedir="out/production" includes="flightplot.jar" />
<zip destfile="out/production/flightplot.app.zip">
<zipfileset dir="out/production" includes="FlightPlot.app/**/*" filemode="755" />
</zip>
</target>
<target name="clean" description="Clean up">
<delete dir="out/production"/>
</target>
</project>