forked from IbcAlpha/IBC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
83 lines (74 loc) · 3.36 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
<project name="IBC" default="dist" basedir=".">
<property environment="env"/>
<fail unless="env.IBC_BIN" message="Environment variable 'IBC_BIN' not set (set it to the fully-qualified directory name containing the TWS jar files)."/>
<property name="ver" value="3.8.4-beta.2"/>
<property name="src" location="src"/>
<property name="resources" location="resources"/>
<property name="target" location="target"/>
<property name="dist" location="dist"/>
<property name="nl" value="${line.separator}" />
<property name="org" value="ibcalpha"/>
<property name="component" value="ibc"/>
<path id="external.classpath">
<fileset dir="${env.IBC_BIN}" includes="**/*.jar"/>
</path>
<target name="clean" description="clean up">
<delete dir="${target}"/>
<delete dir="${dist}"/>
</target>
<target name="init" description="update the IbcVersionInfo class">
<echo file="${src}/${org}/${component}/IbcVersionInfo.java" append="false">// NB: this file is updated by the Ant build script
package ibcalpha.ibc;
public class IbcVersionInfo {
public final static String IBC_VERSION = "${ver}";
}
</echo>
</target>
<target name="compile" depends="init" description="compile the source ">
<mkdir dir="${target}/classes"/>
<javac srcdir="${src}" destdir="${target}/classes" source="8" target="8" includeantruntime="false">
<classpath refid="external.classpath"/>
<compilerarg value="-Xlint:all"/>
</javac>
</target>
<target name="jar" depends="compile" description="generate the jar">
<jar jarfile="${resources}/IBC.jar" basedir="${target}/classes"/>
</target>
<target name="dist" depends="jar" description="generate the distribution zip">
<echo file="${resources}/version" append="false" message="${ver}"/>
<copy todir="${target}/IBCWin" preservelastmodified="true">
<fileset file="LICENSE.txt"/>
<fileset dir="${resources}">
<include name="**/*"/>
<exclude name="**/*.sh"/>
</fileset>
</copy>
<zip destfile="${dist}/IBCWin-${ver}.zip" basedir="${target}/IBCWin" includes="**"/>
<copy todir="${target}/IBCLinux" preservelastmodified="true">
<fileset file="LICENSE.txt"/>
<fileset dir="${resources}">
<include name="**/*"/>
<exclude name="**/*.bat"/>
<exclude name="**/*.vbs"/>
<exclude name="**/*macos.sh"/>
<exclude name="**/*.xml"/>
<exclude name="**/IBC (*"/>
</fileset>
</copy>
<zip destfile="${dist}/IBCLinux-${ver}.zip" basedir="${target}/IBCLinux" includes="**"/>
<copy todir="${target}/IBCMacos" preservelastmodified="true">
<fileset file="LICENSE.txt"/>
<fileset dir="${resources}">
<include name="**/*"/>
<exclude name="**/*.bat"/>
<exclude name="**/*.vbs"/>
<include name="**/*macos.sh"/>
<include name="**/*.sh"/>
<exclude name="*start.sh"/>
<exclude name="**/*.xml"/>
<exclude name="**/IBC (*"/>
</fileset>
</copy>
<zip destfile="${dist}/IBCMacos-${ver}.zip" basedir="${target}/IBCMacos" includes="**"/>
</target>
</project>