-
Notifications
You must be signed in to change notification settings - Fork 53
/
build-trackercore.xml
54 lines (43 loc) · 1.96 KB
/
build-trackercore.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
<project name="OSPCore" default="toJs" basedir=".">
<property name="site.path" value="site/swingjs" />
<property name="j2s.dir" value="${site.path}/swingjs/j2s" />
<target name="toJs" id="toJs">
<!-- create a NON svn local directory only containing JS files
<echo>Deleting the site directory.</echo>
<delete quiet="true" dir="site" />
-->
<!-- make core files -->
<echo>creating and compressing core files - warnings are OK; "does not exist" is trouble</echo>
<echo>reading core class list from file coreclasses</echo>
<loadresource property="coreclasses">
<file file="trackerclasses"/>
</loadresource>
<antcall target="call-core">
<param name="call-core.name" value="_tracker" />
<param name="call-core.list" value="
core/coreswingjs.js
${coreclasses}
" />
</antcall>
</target>
<target name="call-core" id="call-core">
<echo>......Creating core${call-core.name}.js</echo>
<concat destfile="${site.path}/js/core/tmp.js">
<filelist dir="${site.path}/j2s" files="${call-core.list}" />
</concat>
<replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz." value="Clazz_"/>
<replace dir="${site.path}/js/core" includes="tmp.js" token="Clazz__" value="Clazz._"/>
<echo>......Generating ${site.path}/j2s/core/core${call-core.name}.js</echo>
<concat destfile="${site.path}/j2s/core/core${call-core.name}.js"><filelist dir="${site.path}/js" files="
core/coretop2.js
core/tmp.js
core/corebottom2.js
" />
</concat>
<echo>......Generating ${site.path}/j2s/core/core${call-core.name}.z.js</echo>
<java jar="jars/closure_compiler.jar" fork="true" dir="${site.path}/j2s/core" failonerror="false">
<arg line="--js core${call-core.name}.js --js_output_file core${call-core.name}.z.js" />
</java>
<delete quiet="true" file="${site.path}/js/core/tmp.js" />
</target>
</project>