-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
149 lines (133 loc) · 5.16 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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar_with_version" name="JSTools">
<!--this file was created by Eclipse Runnable JAR Export Wizard-->
<!--ANT 1.7 is required -->
<property file="version.properties"/>
<property file="build.properties"/>
<target name="create_run_jar">
<jar destfile="${jstools.dir}/build/jstools.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="com.miconblog.jstools.MainApp"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${jstools.dir}/res"/>
<fileset dir="${jstools.dir}/bin"/>
<zipfileset excludes="META-INF/*.SF" src="${jstools.dir}/lib/yuicompressor-2.4.7.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${jstools.dir}/lib/js2.jar"/>
</jar>
</target>
<target name="create_run_jar_with_version">
<jar destfile="${jstools.dir}/build/jstools-${jstools.version}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="com.miconblog.jstools.MainApp"/>
<attribute name="Class-Path" value="."/>
</manifest>
<fileset dir="${jstools.dir}/res"/>
<fileset dir="${jstools.dir}/bin"/>
<zipfileset excludes="META-INF/*.SF" src="${jstools.dir}/lib/yuicompressor-2.4.7.jar"/>
<zipfileset excludes="META-INF/*.SF" src="${jstools.dir}/lib/js2.jar"/>
</jar>
</target>
<target name="release_jstools" depends="create_run_jar_with_version">
<copy todir="${basedir}/build/doc">
<fileset dir="${basedir}/doc">
<exclude name="**/*.xml" />
</fileset>
</copy>
<mkdir dir="${basedir}/release"/>
<zip destfile="${basedir}/release/jstools-${jstools.version}.zip"
basedir="${basedir}/build"
/>
<delete includeemptydirs="true">
<fileset dir="${basedir}/build" includes="**/*"/>
</delete>
</target>
<target name="~jslint" description="test">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-conf=./doc/jstools.conf"/>
<arg value="-jslint" />
</exec>
</target>
<target name="~jsmeter" description="test">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-conf=./doc/jstools.conf"/>
<arg value="-jsmeter" />
</exec>
</target>
<target name="~listout" description="test">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-conf=./doc/jstools.conf"/>
<arg value="-list=./samples/listout/mergelist.txt" />
<arg value="-output=./samples/listout/list.txt"/>
<arg value="-listout" />
</exec>
</target>
<target name="~remove_comments" description="test">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="./samples/js2/CalculateMileage.js"/>
<arg value="-compress=1"/>
<arg value="-line-break=100"/>
<arg value="-conf=./doc/jstools.conf"/>
<arg value="-output=./samples/js2/CalculateMileaged.js" />
</exec>
</target>
<target name="~merge_files" description="merge files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-conf=D:\workspace\jPower\builder\jstools.conf"/>
</exec>
</target>
<target name="~merge_files_with_list" description="merge files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-list=${basedir}/doc/mergelist.txt"/>
</exec>
</target>
<target name="~uglify_files_with_list" description="compress files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-list=${basedir}/doc/mergelist.txt"/>
<arg value="-compress=5"/>
<arg value="-output=${basedir}/compress.js"/>
<arg value="-line-break=100"/>
<arg value="-keeplicense"/>
</exec>
</target>
<target name="~merge_ms949" description="merge files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="-list=${basedir}/samples/ms949/mergelist.txt"/>
<arg value="-conf=${basedir}/samples/ms949/jstools.conf"/>
</exec>
</target>
<target name="~preprossor" description="merge files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="${basedir}/samples/tpl/template.tpl"/>
<arg value="-output=${basedir}/samples/tpl/template.js"/>
<arg value="-tplcomplie"/>
</exec>
</target>
<target name="~preprossor_list" description="merge files">
<exec executable="java">
<arg line="-jar" />
<arg path="${basedir}/build/jstools.jar" />
<arg value="${basedir}/samples/tpl"/>
<arg value="-output=${basedir}/samples/tpl/tpl.js"/>
<arg value="-tplcomplie"/>
</exec>
</target>
</project>