|
@@ -0,0 +1,707 @@
|
|
1
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+<!--
|
|
3
|
+*** GENERATED FROM project.xml - DO NOT EDIT ***
|
|
4
|
+*** EDIT ../build.xml INSTEAD ***
|
|
5
|
+
|
|
6
|
+For the purpose of easier reading the script
|
|
7
|
+is divided into following sections:
|
|
8
|
+
|
|
9
|
+ - initialization
|
|
10
|
+ - compilation
|
|
11
|
+ - jar
|
|
12
|
+ - execution
|
|
13
|
+ - debugging
|
|
14
|
+ - javadoc
|
|
15
|
+ - junit compilation
|
|
16
|
+ - junit execution
|
|
17
|
+ - junit debugging
|
|
18
|
+ - cleanup
|
|
19
|
+
|
|
20
|
+ -->
|
|
21
|
+<project xmlns:androidproject1="http://www.netbeans.org/ns/android-project/1" basedir=".." default="default" name="ContextAnalyser-impl">
|
|
22
|
+ <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
|
|
23
|
+ <!--
|
|
24
|
+ ======================
|
|
25
|
+ INITIALIZATION SECTION
|
|
26
|
+ ======================
|
|
27
|
+ -->
|
|
28
|
+ <target name="-pre-init">
|
|
29
|
+ <!-- Empty placeholder for easier customization. -->
|
|
30
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
31
|
+ </target>
|
|
32
|
+ <target depends="-pre-init" name="-init-private">
|
|
33
|
+ <property file="nbproject/private/config.properties"/>
|
|
34
|
+ <property file="nbproject/private/configs/${config}.properties"/>
|
|
35
|
+ <property file="nbproject/private/private.properties"/>
|
|
36
|
+ </target>
|
|
37
|
+ <target depends="-pre-init,-init-private" name="-init-user">
|
|
38
|
+ <property file="${user.properties.file}"/>
|
|
39
|
+ <!-- The two properties below are usually overridden -->
|
|
40
|
+ <!-- by the active platform. Just a fallback. -->
|
|
41
|
+ <property name="default.javac.source" value="1.4"/>
|
|
42
|
+ <property name="default.javac.target" value="1.4"/>
|
|
43
|
+ </target>
|
|
44
|
+ <target depends="-pre-init,-init-private,-init-user" name="-init-project">
|
|
45
|
+ <property file="nbproject/configs/${config}.properties"/>
|
|
46
|
+ <property file="nbproject/project.properties"/>
|
|
47
|
+ </target>
|
|
48
|
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
|
|
49
|
+ <androidproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
|
|
50
|
+ <androidproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
|
|
51
|
+ <androidproject1:property name="platform.bootcp0" value="platforms.${platform.active}.bootclasspath0"/>
|
|
52
|
+ <androidproject1:property name="platform.bootcp1" value="platforms.${platform.active}.bootclasspath1"/>
|
|
53
|
+ <androidproject1:property name="aapt" value="platforms.${platform.active}.aapt"/>
|
|
54
|
+ <androidproject1:property name="adb" value="platforms.${platform.active}.adb"/>
|
|
55
|
+ <androidproject1:property name="dx" value="platforms.${platform.active}.dx"/>
|
|
56
|
+ <androidproject1:property name="emulator" value="platforms.${platform.active}.emulator"/>
|
|
57
|
+ <androidproject1:property name="apkbuilder" value="platforms.${platform.active}.apkbuilder"/>
|
|
58
|
+ <condition property="bootclasspath1.available">
|
|
59
|
+ <and>
|
|
60
|
+ <isset property="platforms.${platform.active}.bootclasspath1"/>
|
|
61
|
+ <not>
|
|
62
|
+ <equals arg1="${platform.bootcp1}" arg2="" trim="true"/>
|
|
63
|
+ </not>
|
|
64
|
+ </and>
|
|
65
|
+ </condition>
|
|
66
|
+ <condition property="no.bootclasspath1.available">
|
|
67
|
+ <not>
|
|
68
|
+ <isset property="bootclasspath1.available"/>
|
|
69
|
+ </not>
|
|
70
|
+ </condition>
|
|
71
|
+ <condition property="assets.available">
|
|
72
|
+ <and>
|
|
73
|
+ <isset property="${assets.dir}"/>
|
|
74
|
+ <not>
|
|
75
|
+ <equals arg1="${assets.dir}" arg2="" trim="true"/>
|
|
76
|
+ </not>
|
|
77
|
+ <available file="${assets.dir}" property="assets.available"/>
|
|
78
|
+ </and>
|
|
79
|
+ </condition>
|
|
80
|
+ <available file="${manifest.file}" property="manifest.available"/>
|
|
81
|
+ <condition property="have.tests">
|
|
82
|
+ <or>
|
|
83
|
+ <available file="${test.src.dir}"/>
|
|
84
|
+ </or>
|
|
85
|
+ </condition>
|
|
86
|
+ <condition property="have.sources">
|
|
87
|
+ <or>
|
|
88
|
+ <available file="${src.dir}"/>
|
|
89
|
+ </or>
|
|
90
|
+ </condition>
|
|
91
|
+ <condition property="netbeans.home+have.tests">
|
|
92
|
+ <and>
|
|
93
|
+ <isset property="netbeans.home"/>
|
|
94
|
+ <isset property="have.tests"/>
|
|
95
|
+ </and>
|
|
96
|
+ </condition>
|
|
97
|
+ <condition property="no.javadoc.preview">
|
|
98
|
+ <and>
|
|
99
|
+ <isset property="javadoc.preview"/>
|
|
100
|
+ <isfalse value="${javadoc.preview}"/>
|
|
101
|
+ </and>
|
|
102
|
+ </condition>
|
|
103
|
+ <property name="run.jvmargs" value=""/>
|
|
104
|
+ <property name="javac.compilerargs" value=""/>
|
|
105
|
+ <property name="work.dir" value="${basedir}"/>
|
|
106
|
+ <condition property="no.deps">
|
|
107
|
+ <and>
|
|
108
|
+ <istrue value="${no.dependencies}"/>
|
|
109
|
+ </and>
|
|
110
|
+ </condition>
|
|
111
|
+ <property name="javac.debug" value="true"/>
|
|
112
|
+ <property name="javadoc.preview" value="true"/>
|
|
113
|
+ <property name="application.args" value=""/>
|
|
114
|
+ <property name="source.encoding" value="${file.encoding}"/>
|
|
115
|
+ <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
|
|
116
|
+ <and>
|
|
117
|
+ <isset property="javadoc.encoding"/>
|
|
118
|
+ <not>
|
|
119
|
+ <equals arg1="${javadoc.encoding}" arg2=""/>
|
|
120
|
+ </not>
|
|
121
|
+ </and>
|
|
122
|
+ </condition>
|
|
123
|
+ <property name="javadoc.encoding.used" value="${source.encoding}"/>
|
|
124
|
+ <property name="includes" value="**"/>
|
|
125
|
+ <property name="excludes" value=""/>
|
|
126
|
+ <property name="do.depend" value="false"/>
|
|
127
|
+ <condition property="do.depend.true">
|
|
128
|
+ <istrue value="${do.depend}"/>
|
|
129
|
+ </condition>
|
|
130
|
+ <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
|
|
131
|
+ <and>
|
|
132
|
+ <isset property="jaxws.endorsed.dir"/>
|
|
133
|
+ <available file="nbproject/jaxws-build.xml"/>
|
|
134
|
+ </and>
|
|
135
|
+ </condition>
|
|
136
|
+ <property name="screen.skin" value="HVGA"/>
|
|
137
|
+ <property name="emulator.options" value=""/>
|
|
138
|
+ <property name="android.target.device" value=""/>
|
|
139
|
+ <condition property="do.start.app.false">
|
|
140
|
+ <and>
|
|
141
|
+ <isset property="do.start.app"/>
|
|
142
|
+ <isfalse value="${do.start.app}"/>
|
|
143
|
+ </and>
|
|
144
|
+ </condition>
|
|
145
|
+ </target>
|
|
146
|
+ <target name="-post-init">
|
|
147
|
+ <!-- Empty placeholder for easier customization. -->
|
|
148
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
149
|
+ </target>
|
|
150
|
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
|
|
151
|
+ <fail unless="src.dir">Must set src.dir</fail>
|
|
152
|
+ <fail unless="test.src.dir">Must set test.src.dir</fail>
|
|
153
|
+ <fail unless="build.dir">Must set build.dir</fail>
|
|
154
|
+ <fail unless="dist.dir">Must set dist.dir</fail>
|
|
155
|
+ <fail unless="build.classes.dir">Must set build.classes.dir</fail>
|
|
156
|
+ <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
|
|
157
|
+ <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
|
|
158
|
+ <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
|
|
159
|
+ <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
|
|
160
|
+ <fail unless="dist.apk">Must set dist.apk</fail>
|
|
161
|
+ </target>
|
|
162
|
+ <target name="-init-macrodef-property">
|
|
163
|
+ <macrodef name="property" uri="http://www.netbeans.org/ns/android-project/1">
|
|
164
|
+ <attribute name="name"/>
|
|
165
|
+ <attribute name="value"/>
|
|
166
|
+ <sequential>
|
|
167
|
+ <property name="@{name}" value="${@{value}}"/>
|
|
168
|
+ </sequential>
|
|
169
|
+ </macrodef>
|
|
170
|
+ </target>
|
|
171
|
+ <target name="-init-macrodef-javac">
|
|
172
|
+ <macrodef name="javac" uri="http://www.netbeans.org/ns/android-project/1">
|
|
173
|
+ <attribute default="${src.dir}" name="srcdir"/>
|
|
174
|
+ <attribute default="${build.classes.dir}" name="destdir"/>
|
|
175
|
+ <attribute default="${javac.classpath}" name="classpath"/>
|
|
176
|
+ <attribute default="${includes}" name="includes"/>
|
|
177
|
+ <attribute default="${excludes}" name="excludes"/>
|
|
178
|
+ <attribute default="${javac.debug}" name="debug"/>
|
|
179
|
+ <attribute default="" name="sourcepath"/>
|
|
180
|
+ <element name="customize" optional="true"/>
|
|
181
|
+ <sequential>
|
|
182
|
+ <javac bootclasspath="${platform.bootcp}" debug="@{debug}" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}">
|
|
183
|
+ <classpath>
|
|
184
|
+ <path path="@{classpath}"/>
|
|
185
|
+ </classpath>
|
|
186
|
+ <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
|
|
187
|
+ <customize/>
|
|
188
|
+ </javac>
|
|
189
|
+ </sequential>
|
|
190
|
+ </macrodef>
|
|
191
|
+ <macrodef name="depend" uri="http://www.netbeans.org/ns/android-project/1">
|
|
192
|
+ <attribute default="${src.dir}" name="srcdir"/>
|
|
193
|
+ <attribute default="${build.classes.dir}" name="destdir"/>
|
|
194
|
+ <attribute default="${javac.classpath}" name="classpath"/>
|
|
195
|
+ <sequential>
|
|
196
|
+ <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
|
|
197
|
+ <classpath>
|
|
198
|
+ <path path="@{classpath}"/>
|
|
199
|
+ </classpath>
|
|
200
|
+ </depend>
|
|
201
|
+ </sequential>
|
|
202
|
+ </macrodef>
|
|
203
|
+ <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/android-project/1">
|
|
204
|
+ <attribute default="${build.classes.dir}" name="destdir"/>
|
|
205
|
+ <sequential>
|
|
206
|
+ <fail unless="javac.includes">Must set javac.includes</fail>
|
|
207
|
+ <pathconvert pathsep="," property="javac.includes.binary">
|
|
208
|
+ <path>
|
|
209
|
+ <filelist dir="@{destdir}" files="${javac.includes}"/>
|
|
210
|
+ </path>
|
|
211
|
+ <globmapper from="*.java" to="*.class"/>
|
|
212
|
+ </pathconvert>
|
|
213
|
+ <delete>
|
|
214
|
+ <files includes="${javac.includes.binary}"/>
|
|
215
|
+ </delete>
|
|
216
|
+ </sequential>
|
|
217
|
+ </macrodef>
|
|
218
|
+ </target>
|
|
219
|
+ <target name="-init-macrodef-junit">
|
|
220
|
+ <macrodef name="junit" uri="http://www.netbeans.org/ns/android-project/1">
|
|
221
|
+ <attribute default="${includes}" name="includes"/>
|
|
222
|
+ <attribute default="${excludes}" name="excludes"/>
|
|
223
|
+ <attribute default="**" name="testincludes"/>
|
|
224
|
+ <sequential>
|
|
225
|
+ <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
|
|
226
|
+ <batchtest todir="${build.test.results.dir}">
|
|
227
|
+ <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
|
|
228
|
+ <filename name="@{testincludes}"/>
|
|
229
|
+ </fileset>
|
|
230
|
+ </batchtest>
|
|
231
|
+ <classpath>
|
|
232
|
+ <path path="${run.test.classpath}"/>
|
|
233
|
+ </classpath>
|
|
234
|
+ <syspropertyset>
|
|
235
|
+ <propertyref prefix="test-sys-prop."/>
|
|
236
|
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
237
|
+ </syspropertyset>
|
|
238
|
+ <formatter type="brief" usefile="false"/>
|
|
239
|
+ <formatter type="xml"/>
|
|
240
|
+ <jvmarg line="${run.jvmargs}"/>
|
|
241
|
+ </junit>
|
|
242
|
+ </sequential>
|
|
243
|
+ </macrodef>
|
|
244
|
+ </target>
|
|
245
|
+ <target name="-init-macrodef-nbjpda">
|
|
246
|
+ <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/android-project/1">
|
|
247
|
+ <attribute default="${main.activity}" name="name"/>
|
|
248
|
+ <attribute default="${debug.classpath}" name="classpath"/>
|
|
249
|
+ <attribute default="" name="stopclassname"/>
|
|
250
|
+ <sequential>
|
|
251
|
+ <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
|
|
252
|
+ <classpath>
|
|
253
|
+ <path path="@{classpath}"/>
|
|
254
|
+ </classpath>
|
|
255
|
+ <bootclasspath>
|
|
256
|
+ <path path="${platform.bootcp}"/>
|
|
257
|
+ </bootclasspath>
|
|
258
|
+ </nbjpdastart>
|
|
259
|
+ </sequential>
|
|
260
|
+ </macrodef>
|
|
261
|
+ <macrodef name="nbjpdaconnect" uri="http://www.netbeans.org/ns/android-project/1">
|
|
262
|
+ <attribute default="${main.activity}" name="name"/>
|
|
263
|
+ <attribute default="${debug.classpath}" name="classpath"/>
|
|
264
|
+ <sequential>
|
|
265
|
+ <nbjpdaconnect address="${local.debug.port}" name="@{name}" transport="dt_socket">
|
|
266
|
+ <classpath>
|
|
267
|
+ <path path="@{classpath}"/>
|
|
268
|
+ </classpath>
|
|
269
|
+ <bootclasspath>
|
|
270
|
+ <path path="${platform.bootcp}"/>
|
|
271
|
+ </bootclasspath>
|
|
272
|
+ </nbjpdaconnect>
|
|
273
|
+ </sequential>
|
|
274
|
+ </macrodef>
|
|
275
|
+ <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/android-project/1">
|
|
276
|
+ <attribute default="${build.classes.dir}" name="dir"/>
|
|
277
|
+ <sequential>
|
|
278
|
+ <nbjpdareload>
|
|
279
|
+ <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
|
|
280
|
+ </nbjpdareload>
|
|
281
|
+ </sequential>
|
|
282
|
+ </macrodef>
|
|
283
|
+ </target>
|
|
284
|
+ <target name="-init-debug-args">
|
|
285
|
+ <property name="version-output" value="java version "${ant.java.version}"/>
|
|
286
|
+ <condition property="have-jdk-older-than-1.4">
|
|
287
|
+ <or>
|
|
288
|
+ <contains string="${version-output}" substring="java version "1.0"/>
|
|
289
|
+ <contains string="${version-output}" substring="java version "1.1"/>
|
|
290
|
+ <contains string="${version-output}" substring="java version "1.2"/>
|
|
291
|
+ <contains string="${version-output}" substring="java version "1.3"/>
|
|
292
|
+ </or>
|
|
293
|
+ </condition>
|
|
294
|
+ <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
|
295
|
+ <istrue value="${have-jdk-older-than-1.4}"/>
|
|
296
|
+ </condition>
|
|
297
|
+ </target>
|
|
298
|
+ <target depends="-init-debug-args" name="-init-macrodef-debug">
|
|
299
|
+ <macrodef name="debug" uri="http://www.netbeans.org/ns/android-project/1">
|
|
300
|
+ <attribute default="${main.activity}" name="classname"/>
|
|
301
|
+ <attribute default="${debug.classpath}" name="classpath"/>
|
|
302
|
+ <element name="customize" optional="true"/>
|
|
303
|
+ <sequential>
|
|
304
|
+ <java classname="@{classname}" dir="${work.dir}" fork="true">
|
|
305
|
+ <jvmarg line="${debug-args-line}"/>
|
|
306
|
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
|
|
307
|
+ <jvmarg line="${run.jvmargs}"/>
|
|
308
|
+ <classpath>
|
|
309
|
+ <path path="@{classpath}"/>
|
|
310
|
+ </classpath>
|
|
311
|
+ <syspropertyset>
|
|
312
|
+ <propertyref prefix="run-sys-prop."/>
|
|
313
|
+ <mapper from="run-sys-prop.*" to="*" type="glob"/>
|
|
314
|
+ </syspropertyset>
|
|
315
|
+ <customize/>
|
|
316
|
+ </java>
|
|
317
|
+ </sequential>
|
|
318
|
+ </macrodef>
|
|
319
|
+ </target>
|
|
320
|
+ <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init,-post-init,-init-check,-init-macrodef-property,-init-macrodef-javac,-init-macrodef-junit,-init-macrodef-nbjpda,-init-macrodef-debug" name="init"/>
|
|
321
|
+ <!--
|
|
322
|
+ ===================
|
|
323
|
+ COMPILATION SECTION
|
|
324
|
+ ===================
|
|
325
|
+ -->
|
|
326
|
+ <target depends="init" name="deps-jar" unless="no.deps"/>
|
|
327
|
+ <target depends="init,deps-jar" name="-pre-pre-compile">
|
|
328
|
+ <mkdir dir="${build.classes.dir}"/>
|
|
329
|
+ </target>
|
|
330
|
+ <target name="-pre-compile">
|
|
331
|
+ <!-- Empty placeholder for easier customization. -->
|
|
332
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
333
|
+ </target>
|
|
334
|
+ <target if="do.depend.true" name="-compile-depend">
|
|
335
|
+ <androidproject1:depend/>
|
|
336
|
+ </target>
|
|
337
|
+ <target depends="init,-pre-pre-compile,-pre-compile" name="-res-compile" unless="bootclasspath1.available">
|
|
338
|
+ <exec executable="${aapt}" failonerror="true">
|
|
339
|
+ <arg value="package"/>
|
|
340
|
+ <arg value="-m"/>
|
|
341
|
+ <arg value="-J"/>
|
|
342
|
+ <arg value="${src.dir}"/>
|
|
343
|
+ <arg value="-M"/>
|
|
344
|
+ <arg value="AndroidManifest.xml"/>
|
|
345
|
+ <arg value="-S"/>
|
|
346
|
+ <arg value="${resource.dir}"/>
|
|
347
|
+ <arg value="-I"/>
|
|
348
|
+ <arg value="${platform.bootcp}"/>
|
|
349
|
+ </exec>
|
|
350
|
+ </target>
|
|
351
|
+ <target depends="init,-pre-pre-compile,-pre-compile" if="bootclasspath1.available" name="-res-compile1">
|
|
352
|
+ <exec executable="${aapt}" failonerror="true">
|
|
353
|
+ <arg value="package"/>
|
|
354
|
+ <arg value="-m"/>
|
|
355
|
+ <arg value="-J"/>
|
|
356
|
+ <arg value="${src.dir}"/>
|
|
357
|
+ <arg value="-M"/>
|
|
358
|
+ <arg value="AndroidManifest.xml"/>
|
|
359
|
+ <arg value="-S"/>
|
|
360
|
+ <arg value="${resource.dir}"/>
|
|
361
|
+ <arg value="-I"/>
|
|
362
|
+ <arg value="${platform.bootcp0}"/>
|
|
363
|
+ <arg value="-I"/>
|
|
364
|
+ <arg value="${platform.bootcp1}"/>
|
|
365
|
+ </exec>
|
|
366
|
+ </target>
|
|
367
|
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile" name="-idl-compile"/>
|
|
368
|
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
|
|
369
|
+ <androidproject1:javac/>
|
|
370
|
+ <copy todir="${build.classes.dir}">
|
|
371
|
+ <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
|
372
|
+ </copy>
|
|
373
|
+ </target>
|
|
374
|
+ <target name="-post-compile">
|
|
375
|
+ <!-- Empty placeholder for easier customization. -->
|
|
376
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
377
|
+ </target>
|
|
378
|
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-res-compile,-res-compile1,-idl-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
|
|
379
|
+ <target name="-pre-compile-single">
|
|
380
|
+ <!-- Empty placeholder for easier customization. -->
|
|
381
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
382
|
+ </target>
|
|
383
|
+ <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
|
|
384
|
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
|
385
|
+ <androidproject1:force-recompile/>
|
|
386
|
+ <androidproject1:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
|
|
387
|
+ </target>
|
|
388
|
+ <target name="-post-compile-single">
|
|
389
|
+ <!-- Empty placeholder for easier customization. -->
|
|
390
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
391
|
+ </target>
|
|
392
|
+ <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
|
|
393
|
+ <!--
|
|
394
|
+ ====================
|
|
395
|
+ JAR BUILDING SECTION
|
|
396
|
+ ====================
|
|
397
|
+ -->
|
|
398
|
+ <target depends="init" name="-pre-pre-jar">
|
|
399
|
+ <dirname file="${dist.apk}" property="dist.apk.dir"/>
|
|
400
|
+ <mkdir dir="${dist.apk.dir}"/>
|
|
401
|
+ </target>
|
|
402
|
+ <target name="-pre-jar">
|
|
403
|
+ <!-- Empty placeholder for easier customization. -->
|
|
404
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
405
|
+ </target>
|
|
406
|
+ <target name="-post-jar">
|
|
407
|
+ <!-- Empty placeholder for easier customization. -->
|
|
408
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
409
|
+ </target>
|
|
410
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-dex">
|
|
411
|
+ <exec executable="${dx}" failonerror="true">
|
|
412
|
+ <arg value="--dex"/>
|
|
413
|
+ <arg value="--output=${basedir}/${intermediate.dex}"/>
|
|
414
|
+ <arg value="--positions=lines"/>
|
|
415
|
+ <arg path="${build.classes.dir}"/>
|
|
416
|
+ </exec>
|
|
417
|
+ </target>
|
|
418
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="assets.available" name="-package-res-and-assets" unless="bootclasspath1.available">
|
|
419
|
+ <exec executable="${aapt}" failonerror="true">
|
|
420
|
+ <arg value="package"/>
|
|
421
|
+ <arg value="-f"/>
|
|
422
|
+ <arg value="-M"/>
|
|
423
|
+ <arg value="AndroidManifest.xml"/>
|
|
424
|
+ <arg value="-S"/>
|
|
425
|
+ <arg value="${resource.dir}"/>
|
|
426
|
+ <arg value="-A"/>
|
|
427
|
+ <arg value="${asset.dir}"/>
|
|
428
|
+ <arg value="-I"/>
|
|
429
|
+ <arg value="${platform.bootcp}"/>
|
|
430
|
+ <arg value="-F"/>
|
|
431
|
+ <arg value="${dist.apk}_"/>
|
|
432
|
+ </exec>
|
|
433
|
+ </target>
|
|
434
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="assets.available" name="-package-res-and-assets1" unless="no.bootclasspath1.available">
|
|
435
|
+ <exec executable="${aapt}" failonerror="true">
|
|
436
|
+ <arg value="package"/>
|
|
437
|
+ <arg value="-f"/>
|
|
438
|
+ <arg value="-M"/>
|
|
439
|
+ <arg value="AndroidManifest.xml"/>
|
|
440
|
+ <arg value="-S"/>
|
|
441
|
+ <arg value="${resource.dir}"/>
|
|
442
|
+ <arg value="-A"/>
|
|
443
|
+ <arg value="${asset.dir}"/>
|
|
444
|
+ <arg value="-I"/>
|
|
445
|
+ <arg value="${platform.bootcp0}"/>
|
|
446
|
+ <arg value="-I"/>
|
|
447
|
+ <arg value="${platform.bootcp1}"/>
|
|
448
|
+ <arg value="-F"/>
|
|
449
|
+ <arg value="${dist.apk}_"/>
|
|
450
|
+ </exec>
|
|
451
|
+ </target>
|
|
452
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="no.bootclasspath1.available" name="-package-res-no-assets" unless="assets.available">
|
|
453
|
+ <exec executable="${aapt}" failonerror="true">
|
|
454
|
+ <arg value="package"/>
|
|
455
|
+ <arg value="-f"/>
|
|
456
|
+ <arg value="-M"/>
|
|
457
|
+ <arg value="AndroidManifest.xml"/>
|
|
458
|
+ <arg value="-S"/>
|
|
459
|
+ <arg value="${resource.dir}"/>
|
|
460
|
+ <arg value="-I"/>
|
|
461
|
+ <arg value="${platform.bootcp}"/>
|
|
462
|
+ <arg value="-F"/>
|
|
463
|
+ <arg value="${dist.apk}_"/>
|
|
464
|
+ </exec>
|
|
465
|
+ </target>
|
|
466
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar" if="bootclasspath1.available" name="-package-res-no-assets1" unless="assets.available">
|
|
467
|
+ <exec executable="${aapt}" failonerror="true">
|
|
468
|
+ <arg value="package"/>
|
|
469
|
+ <arg value="-f"/>
|
|
470
|
+ <arg value="-M"/>
|
|
471
|
+ <arg value="AndroidManifest.xml"/>
|
|
472
|
+ <arg value="-S"/>
|
|
473
|
+ <arg value="${resource.dir}"/>
|
|
474
|
+ <arg value="-I"/>
|
|
475
|
+ <arg value="${platform.bootcp0}"/>
|
|
476
|
+ <arg value="-I"/>
|
|
477
|
+ <arg value="${platform.bootcp1}"/>
|
|
478
|
+ <arg value="-F"/>
|
|
479
|
+ <arg value="${dist.apk}_"/>
|
|
480
|
+ </exec>
|
|
481
|
+ </target>
|
|
482
|
+ <target depends="init,compile,-pre-pre-jar,-pre-jar,-dex,-package-res-and-assets,-package-res-no-assets,-package-res-and-assets1,-package-res-no-assets1" name="-package-dex">
|
|
483
|
+ <dirname file="${intermediate.dex}" property="package-dex.dex.folder"/>
|
|
484
|
+ <basename file="${intermediate.dex}" property="package-dex.dex.file"/>
|
|
485
|
+ <zip destfile="${dist.apk}_" update="true">
|
|
486
|
+ <fileset dir="${package-dex.dex.folder}" includes="${package-dex.dex.file}"/>
|
|
487
|
+ </zip>
|
|
488
|
+ </target>
|
|
489
|
+ <target depends="init,-package-res-and-assets,-package-res-no-assets,-package-dex" name="-sign">
|
|
490
|
+ <exec executable="${apkbuilder}" failonerror="true">
|
|
491
|
+ <arg value="${basedir}/${dist.apk}"/>
|
|
492
|
+ <arg value="-z"/>
|
|
493
|
+ <arg value="${basedir}/${dist.apk}_"/>
|
|
494
|
+ </exec>
|
|
495
|
+ <delete file="${dist.apk}_"/>
|
|
496
|
+ </target>
|
|
497
|
+ <target depends="init,compile,-pre-jar,-dex,-package-res-and-assets,-package-res-no-assets,-package-dex,-sign,-post-jar" description="Build JAR." name="jar"/>
|
|
498
|
+ <!--
|
|
499
|
+ =================
|
|
500
|
+ EXECUTION SECTION
|
|
501
|
+ =================
|
|
502
|
+ -->
|
|
503
|
+ <target depends="init,compile,jar,-start-emulator,-wait-for-emulator,-install-app,-run-app" description="Run a main activity." name="run"/>
|
|
504
|
+ <target depends="init,compile,jar,-start-emulator,-wait-for-emulator,-install-app" name="-run-app" unless="do.start.app.false">
|
|
505
|
+ <taskdef classname="org.netbeans.modules.android.ant.AndroidManifestParse" classpath="${libs.AndroidAntTasks.classpath}" name="android-manifest-parse"/>
|
|
506
|
+ <android-manifest-parse mainActivityProperty="main.activity" manifestFile="AndroidManifest.xml"/>
|
|
507
|
+ <echo message="About to start ${main.component}/${main.activity}"/>
|
|
508
|
+ <exec executable="${adb}">
|
|
509
|
+ <arg line="${android.target.device}"/>
|
|
510
|
+ <arg value="shell"/>
|
|
511
|
+ <arg value="am start -n ${main.component}/${main.activity}"/>
|
|
512
|
+ </exec>
|
|
513
|
+ </target>
|
|
514
|
+ <target depends="init,compile,jar" name="-emulator-running">
|
|
515
|
+ <exec executable="${adb}" outputproperty="emulator-running.out" resultproperty="is.emulator.running.tmp">
|
|
516
|
+ <arg line="${android.target.device}"/>
|
|
517
|
+ <arg value="shell"/>
|
|
518
|
+ <arg value="date"/>
|
|
519
|
+ </exec>
|
|
520
|
+ <condition property="is.emulator.running">
|
|
521
|
+ <not>
|
|
522
|
+ <isfailure code="${is.emulator.running.tmp}"/>
|
|
523
|
+ </not>
|
|
524
|
+ </condition>
|
|
525
|
+ </target>
|
|
526
|
+ <target depends="init,compile,jar,-emulator-running" name="-start-emulator" unless="is.emulator.running">
|
|
527
|
+ <exec executable="${adb}">
|
|
528
|
+ <arg value="kill-server"/>
|
|
529
|
+ </exec>
|
|
530
|
+ <fail unless="android.target.avd">Must set android.target.avd</fail>
|
|
531
|
+ <exec executable="${emulator}" spawn="true">
|
|
532
|
+ <arg value="-skin"/>
|
|
533
|
+ <arg value="${screen.skin}"/>
|
|
534
|
+ <arg value="-avd"/>
|
|
535
|
+ <arg value="${android.target.avd}"/>
|
|
536
|
+ <arg line="${emulator.options}"/>
|
|
537
|
+ </exec>
|
|
538
|
+ </target>
|
|
539
|
+ <target depends="init,compile,jar,-start-emulator" name="-wait-for-emulator">
|
|
540
|
+ <taskdef classname="org.netbeans.modules.android.ant.AdbPackageManagerWait" classpath="${libs.AndroidAntTasks.classpath}" name="adb-pm-wait"/>
|
|
541
|
+ <adb-pm-wait adb="${adb}" deviceArgs="${android.target.device}"/>
|
|
542
|
+ </target>
|
|
543
|
+ <target depends="init,compile,jar,-start-emulator,-wait-for-emulator" name="-install-app">
|
|
544
|
+ <exec executable="${adb}">
|
|
545
|
+ <arg line="${android.target.device}"/>
|
|
546
|
+ <arg value="install"/>
|
|
547
|
+ <arg value="-r"/>
|
|
548
|
+ <arg value="${dist.apk}"/>
|
|
549
|
+ </exec>
|
|
550
|
+ </target>
|
|
551
|
+ <target name="-do-not-recompile">
|
|
552
|
+ <property name="javac.includes.binary" value=""/>
|
|
553
|
+ </target>
|
|
554
|
+ <!--
|
|
555
|
+ =================
|
|
556
|
+ DEBUGGING SECTION
|
|
557
|
+ =================
|
|
558
|
+ -->
|
|
559
|
+ <target depends="init,-debug-start-debuggee" if="netbeans.home" name="-debug-start-debugger">
|
|
560
|
+ <androidproject1:nbjpdaconnect/>
|
|
561
|
+ </target>
|
|
562
|
+ <target depends="init,compile,-start-emulator,-wait-for-emulator,-install-app" name="-debug-start-debuggee">
|
|
563
|
+ <taskdef classname="org.netbeans.modules.android.ant.AndroidManifestParse" classpath="${libs.AndroidAntTasks.classpath}" name="android-manifest-parse"/>
|
|
564
|
+ <android-manifest-parse mainActivityProperty="main.activity" manifestFile="AndroidManifest.xml"/>
|
|
565
|
+ <echo message="About to start ${main.component}/${main.activity}"/>
|
|
566
|
+ <exec executable="${adb}">
|
|
567
|
+ <arg line="${android.target.device}"/>
|
|
568
|
+ <arg value="shell"/>
|
|
569
|
+ <arg value="am start -D -n ${main.component}/${main.activity}"/>
|
|
570
|
+ </exec>
|
|
571
|
+ <getdebuggerport addressProperty="local.debug.port" app="${main.component}"/>
|
|
572
|
+ </target>
|
|
573
|
+ <target depends="init,compile,-debug-start-debuggee,-debug-start-debugger" description="Debug project in IDE." if="netbeans.home" name="debug"/>
|
|
574
|
+ <!--
|
|
575
|
+ ===============
|
|
576
|
+ JAVADOC SECTION
|
|
577
|
+ ===============
|
|
578
|
+ -->
|
|
579
|
+ <target depends="init" name="-javadoc-build">
|
|
580
|
+ <mkdir dir="${dist.javadoc.dir}"/>
|
|
581
|
+ <javadoc additionalparam="${javadoc.additionalparam}" author="${javadoc.author}" charset="UTF-8" destdir="${dist.javadoc.dir}" docencoding="UTF-8" encoding="${javadoc.encoding.used}" failonerror="true" noindex="${javadoc.noindex}" nonavbar="${javadoc.nonavbar}" notree="${javadoc.notree}" private="${javadoc.private}" source="${javac.source}" splitindex="${javadoc.splitindex}" use="${javadoc.use}" useexternalfile="true" version="${javadoc.version}" windowtitle="${javadoc.windowtitle}">
|
|
582
|
+ <classpath>
|
|
583
|
+ <path path="${javac.classpath}"/>
|
|
584
|
+ </classpath>
|
|
585
|
+ <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
|
|
586
|
+ <filename name="**/*.java"/>
|
|
587
|
+ </fileset>
|
|
588
|
+ </javadoc>
|
|
589
|
+ </target>
|
|
590
|
+ <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
|
|
591
|
+ <nbbrowse file="${dist.javadoc.dir}/index.html"/>
|
|
592
|
+ </target>
|
|
593
|
+ <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
|
|
594
|
+ <!--
|
|
595
|
+ =========================
|
|
596
|
+ JUNIT COMPILATION SECTION
|
|
597
|
+ =========================
|
|
598
|
+ -->
|
|
599
|
+ <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
|
|
600
|
+ <mkdir dir="${build.test.classes.dir}"/>
|
|
601
|
+ </target>
|
|
602
|
+ <target name="-pre-compile-test">
|
|
603
|
+ <!-- Empty placeholder for easier customization. -->
|
|
604
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
605
|
+ </target>
|
|
606
|
+ <target if="do.depend.true" name="-compile-test-depend">
|
|
607
|
+ <androidproject1:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
|
608
|
+ </target>
|
|
609
|
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
|
|
610
|
+ <androidproject1:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
|
|
611
|
+ <copy todir="${build.test.classes.dir}">
|
|
612
|
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
|
613
|
+ </copy>
|
|
614
|
+ </target>
|
|
615
|
+ <target name="-post-compile-test">
|
|
616
|
+ <!-- Empty placeholder for easier customization. -->
|
|
617
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
618
|
+ </target>
|
|
619
|
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
|
|
620
|
+ <target name="-pre-compile-test-single">
|
|
621
|
+ <!-- Empty placeholder for easier customization. -->
|
|
622
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
623
|
+ </target>
|
|
624
|
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
|
|
625
|
+ <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
|
|
626
|
+ <androidproject1:force-recompile destdir="${build.test.classes.dir}"/>
|
|
627
|
+ <androidproject1:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" excludes="" includes="${javac.includes}" sourcepath="${test.src.dir}" srcdir="${test.src.dir}"/>
|
|
628
|
+ <copy todir="${build.test.classes.dir}">
|
|
629
|
+ <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
|
|
630
|
+ </copy>
|
|
631
|
+ </target>
|
|
632
|
+ <target name="-post-compile-test-single">
|
|
633
|
+ <!-- Empty placeholder for easier customization. -->
|
|
634
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
635
|
+ </target>
|
|
636
|
+ <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
|
|
637
|
+ <!--
|
|
638
|
+ =======================
|
|
639
|
+ JUNIT EXECUTION SECTION
|
|
640
|
+ =======================
|
|
641
|
+ -->
|
|
642
|
+ <target depends="init" if="have.tests" name="-pre-test-run">
|
|
643
|
+ <mkdir dir="${build.test.results.dir}"/>
|
|
644
|
+ </target>
|
|
645
|
+ <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
|
|
646
|
+ <androidproject1:junit testincludes="**/*Test.java"/>
|
|
647
|
+ </target>
|
|
648
|
+ <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
|
|
649
|
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
650
|
+ </target>
|
|
651
|
+ <target depends="init" if="have.tests" name="test-report"/>
|
|
652
|
+ <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
|
|
653
|
+ <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
|
|
654
|
+ <target depends="init" if="have.tests" name="-pre-test-run-single">
|
|
655
|
+ <mkdir dir="${build.test.results.dir}"/>
|
|
656
|
+ </target>
|
|
657
|
+ <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
|
|
658
|
+ <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
|
|
659
|
+ <androidproject1:junit excludes="" includes="${test.includes}"/>
|
|
660
|
+ </target>
|
|
661
|
+ <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
|
|
662
|
+ <fail if="tests.failed">Some tests failed; see details above.</fail>
|
|
663
|
+ </target>
|
|
664
|
+ <target depends="init,-do-not-recompile,compile-test-single,-pre-test-run-single,-do-test-run-single,-post-test-run-single" description="Run single unit test." name="test-single"/>
|
|
665
|
+ <!--
|
|
666
|
+ =======================
|
|
667
|
+ JUNIT DEBUGGING SECTION
|
|
668
|
+ =======================
|
|
669
|
+ -->
|
|
670
|
+ <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
|
|
671
|
+ <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
|
|
672
|
+ <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
|
|
673
|
+ <delete file="${test.report.file}"/>
|
|
674
|
+ <mkdir dir="${build.test.results.dir}"/>
|
|
675
|
+ <androidproject1:debug classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner" classpath="${ant.home}/lib/ant.jar:${ant.home}/lib/ant-junit.jar:${debug.test.classpath}">
|
|
676
|
+ <customize>
|
|
677
|
+ <syspropertyset>
|
|
678
|
+ <propertyref prefix="test-sys-prop."/>
|
|
679
|
+ <mapper from="test-sys-prop.*" to="*" type="glob"/>
|
|
680
|
+ </syspropertyset>
|
|
681
|
+ <arg value="${test.class}"/>
|
|
682
|
+ <arg value="showoutput=true"/>
|
|
683
|
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
|
|
684
|
+ <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
|
|
685
|
+ </customize>
|
|
686
|
+ </androidproject1:debug>
|
|
687
|
+ </target>
|
|
688
|
+ <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
|
|
689
|
+ <androidproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
|
|
690
|
+ </target>
|
|
691
|
+ <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
|
|
692
|
+ <!--
|
|
693
|
+ ===============
|
|
694
|
+ CLEANUP SECTION
|
|
695
|
+ ===============
|
|
696
|
+ -->
|
|
697
|
+ <target depends="init" name="deps-clean" unless="no.deps"/>
|
|
698
|
+ <target depends="init" name="-do-clean">
|
|
699
|
+ <delete dir="${build.dir}"/>
|
|
700
|
+ <delete dir="${dist.dir}"/>
|
|
701
|
+ </target>
|
|
702
|
+ <target name="-post-clean">
|
|
703
|
+ <!-- Empty placeholder for easier customization. -->
|
|
704
|
+ <!-- You can override this target in the ../build.xml file. -->
|
|
705
|
+ </target>
|
|
706
|
+ <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
|
|
707
|
+</project>
|