|
1 <?xml version="1.0"?> |
|
2 <project name="SDKDiagnostics Package" default="develop" basedir="."> |
|
3 |
|
4 <!--==========================================--> |
|
5 <!-- ANT BUILD FILE FOR SDKDIAGNOSTICS PKG --> |
|
6 <!-- --> |
|
7 <!-- To use: --> |
|
8 <!-- % ant -buildfile sdkdiagnostics.build.xml --> |
|
9 <!--==========================================--> |
|
10 |
|
11 <!--==========================================--> |
|
12 <!--set global properties for this build--> |
|
13 <!--==========================================--> |
|
14 <property name="name" value="SDKDiagnostics"/> |
|
15 <property name="build" value="build"/> |
|
16 <property name="verbose" value="off"/> |
|
17 <property name="debug" value="on"/> |
|
18 <property name="javadoc.dir" value="javadoc"/> |
|
19 |
|
20 |
|
21 <property name="build.classes" value="${build}/classes"/> |
|
22 <property name="src" value="${basedir}/src"/> |
|
23 |
|
24 <property name="nmit.shared.dir" value="${basedir}/../NmitShared"/> |
|
25 <property name="lib.path" value="${nmit.shared.dir}/lib"/> |
|
26 |
|
27 <!-- Distribution layout --> |
|
28 <property name="dist" value="${basedir}/dist"/> |
|
29 <property name="dist.lib" value="${dist}/lib"/> |
|
30 <property name="dist.doc" value="${dist}/doc"/> |
|
31 |
|
32 |
|
33 <property name="classpath" value="${lib.path}/app.jar; |
|
34 ${lib.path}/hcodec.jar; |
|
35 ${lib.path}/bookmarks.jar; |
|
36 ${lib.path}/wtkdev.jar; |
|
37 ${lib.path}/http.jar; |
|
38 ${lib.path}/mms.jar; |
|
39 ${lib.path}/util.jar"/> |
|
40 |
|
41 <patternset id="jars.list"> |
|
42 <include name="app.jar"/> |
|
43 <include name="hcodec.jar"/> |
|
44 <include name="bookmarks.jar"/> |
|
45 <include name="wtkdev.jar"/> |
|
46 <include name="http.jar"/> |
|
47 <include name="mms.jar"/> |
|
48 <include name="util.jar"/> |
|
49 </patternset> |
|
50 |
|
51 <!-- Manifest Info --> |
|
52 <property name="manifest" value="${build}/sdkDiagnostics.manifest"/> |
|
53 |
|
54 <!-- Final jar --> |
|
55 <property name="sdkDiagnostics.jar" value="sdkDiagnostics.jar"/> |
|
56 |
|
57 <!--==========================================--> |
|
58 <!--TARGET [PREPARE]--> |
|
59 <!--==========================================--> |
|
60 <target name="prepare" description="Prepare build environment"> |
|
61 <echo>Preparing Build Environment for SDKDiagnostics package </echo> |
|
62 <tstamp/> |
|
63 |
|
64 <!-- remove old stuff --> |
|
65 <delete dir="${build.classes}" quiet="true"/> |
|
66 <delete dir="${javadoc.dir}" quiet="true"/> |
|
67 |
|
68 <!-- create the build directory structure --> |
|
69 <echo>Creating output directories...</echo> |
|
70 <mkdir dir="${build}"/> |
|
71 <mkdir dir="${build.classes}"/> |
|
72 <mkdir dir="${javadoc.dir}"/> |
|
73 </target> |
|
74 |
|
75 <!--==========================================--> |
|
76 <!--TARGET [COMPILE]--> |
|
77 <!--==========================================--> |
|
78 <target name="compile" depends="prepare" description="Compile java sources"> |
|
79 |
|
80 <echo>Building SDKDiagnostics...</echo> |
|
81 <javac |
|
82 srcdir="${src}" |
|
83 destdir="${build.classes}" |
|
84 includes="**/*.java" |
|
85 classpath="${classpath}" |
|
86 verbose="${verbose}" |
|
87 debug="${debug}" |
|
88 /> |
|
89 |
|
90 </target> |
|
91 |
|
92 <!--==========================================--> |
|
93 <!--TARGET [ARCHIVE]--> |
|
94 <!--==========================================--> |
|
95 <target name="archive" description="Archive java classes and resources"> |
|
96 |
|
97 <echo>Copying resource files..</echo> |
|
98 |
|
99 <copy todir="${build.classes}"> |
|
100 <fileset dir="${src}" |
|
101 includes="com/nokia/wtk/**/resources/*" |
|
102 /> |
|
103 </copy> |
|
104 |
|
105 <echo>Creating manifest..</echo> |
|
106 |
|
107 <delete file="${manifest}" quiet="true"/> |
|
108 |
|
109 <!-- NOTE: THERE MUST BE NO EXTRA WHITE SPACE AT END OF LINES --> |
|
110 |
|
111 <echo>Archiving sources and resources..</echo> |
|
112 <jar |
|
113 jarfile="${build}/${sdkDiagnostics.jar}" |
|
114 basedir="${build.classes}" |
|
115 /> |
|
116 </target> |
|
117 |
|
118 <!--==========================================--> |
|
119 <!--TARGET [DEVELOP]--> |
|
120 <!--==========================================--> |
|
121 <target name="develop" depends="compile,archive" description="Build Distribution"> |
|
122 |
|
123 <mkdir dir="${dist.lib}"/> |
|
124 |
|
125 <!-- Just copy the jar --> |
|
126 <copy todir="${dist.lib}"> |
|
127 <fileset dir="${build}" includes="${sdkDiagnostics.jar}"/> |
|
128 <fileset dir="${lib.path}"> |
|
129 <patternset refid="jars.list"/> |
|
130 </fileset> |
|
131 |
|
132 </copy> |
|
133 <echo>Built SDKDiagnostics Package!</echo> |
|
134 |
|
135 </target> |
|
136 |
|
137 <!--==========================================--> |
|
138 <!--TARGET [CLEAN]--> |
|
139 <!--==========================================--> |
|
140 <target name="clean" description="Delete entire build"> |
|
141 <delete dir="${build}"/> |
|
142 <delete dir="${dist}"/> |
|
143 <delete dir="${javadoc.dir}"/> |
|
144 </target> |
|
145 |
|
146 <!--==========================================--> |
|
147 <!--TARGET [CLOBBER]--> |
|
148 <!--==========================================--> |
|
149 <target name="clobber" depends="clean" description="Delete entire package"> |
|
150 <delete dir="${dist}"/> |
|
151 </target> |
|
152 </project> |