-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
190 lines (168 loc) · 4.64 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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0" encoding="UTF-8"?>
<project name="beverage-recipe" default="house-keeping" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
<file name="${java.home}\lib\jfxrt.jar"/>
</filelist>
</path>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpathref="fxant"/>
</target>
<target name="setup-staging-area">
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />
<mkdir dir="externalLibs" />
<copy todir="externalLibs">
<fileset dir="..\lib">
<filename name="jfoenix.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="..\lib">
<filename name="myCBR3.0.1.jar"/>
</fileset>
</copy>
<mkdir dir="project" />
<copy todir="project">
<fileset dir="..\">
<include name="mycbrproj/**" />
</fileset>
</copy>
<copy todir="project">
<fileset dir="..\">
<include name="src/**" />
</fileset>
</copy>
<copy todir="project">
<fileset dir="..\">
<include name="data/**" />
</fileset>
</copy>
<copy todir="project">
<fileset dir="..\">
<include name="config/**" />
</fileset>
</copy>
<mkdir dir="projectRefs" />
</target>
<target name='do-compile'>
<delete dir="build" />
<mkdir dir="build/src" />
<mkdir dir="build/libs" />
<mkdir dir="build/classes" />
<!-- Copy project-libs references -->
<copy todir="build/libs">
<fileset dir="externalLibs">
<include name="jfoenix.jar"/>
<include name="myCBR3.0.1.jar"/>
</fileset>
</copy>
<!-- Copy project references -->
<!-- Copy project sources itself -->
<copy todir="build/src">
<fileset dir="project/mycbrproj">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="build/src">
<fileset dir="project/data">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="build/src">
<fileset dir="project/src">
<include name="**/*"/>
</fileset>
</copy>
<copy todir="build/src">
<fileset dir="project/config">
<include name="**/*"/>
</fileset>
</copy>
<javac includeantruntime="false" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="Cp1252">
<classpath>
<fileset dir="build/libs">
<include name="*"/>
</fileset>
</classpath>
</javac>
<!-- Copy over none Java-Files -->
<copy todir="build/classes">
<fileset dir="project/mycbrproj">
<exclude name="**/*.java"/>
</fileset>
<fileset dir="project/data">
<exclude name="**/*.java"/>
</fileset>
<fileset dir="project/src">
<exclude name="**/*.java"/>
</fileset>
<fileset dir="project/config">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
<delete file="dist"/>
<delete file="deploy" />
<mkdir dir="dist" />
<mkdir dir="dist/libs" />
<mkdir dir="dist/config" />
<mkdir dir="dist/data" />
<mkdir dir="dist/mycbrproj" />
<copy todir="dist/libs">
<fileset dir="externalLibs">
<include name="*" />
</fileset>
</copy>
<copy todir="dist/config">
<fileset dir="project/config">
<include name="*" />
</fileset>
</copy>
<copy todir="dist/data">
<fileset dir="project/data">
<include name="*" />
</fileset>
</copy>
<copy todir="dist/mycbrproj">
<fileset dir="project/mycbrproj">
<include name="*" />
</fileset>
</copy>
<fx:resources id="appRes">
<fx:fileset dir="dist" includes="beverage-recipe.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
</fx:resources>
<fx:application id="fxApplication"
name="Cocktail Recipe Generator"
mainClass="nus.iss.cbr29.pt7.cocktail.MainApp"
toolkit="fx"
/>
<mkdir dir="build/classes/META-INF" />
<fx:jar destfile="dist/beverage-recipe.jar">
<fx:application refid="fxApplication"/>
<fileset dir="build/classes">
</fileset>
<fx:resources refid="appRes"/>
<manifest>
<attribute name="Implementation-Vendor" value="PT7"/>
<attribute name="Implementation-Title" value="Cocktail Recipe Generator"/>
<attribute name="Implementation-Version" value="1.0.0"/>
<attribute name="SplashScreen-Image" value=""/>
<attribute name="JavaFX-Feature-Proxy" value="None"/>
</manifest>
</fx:jar>
</target>
<target name="house-keeping" depends="setup-staging-area, do-compile, init-fx-tasks, do-deploy">
<!-- Remove intermeidate folders -->
<delete dir="build" />
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />
</target>
</project>