equal
deleted
inserted
replaced
112 <os family="windows"/> |
112 <os family="windows"/> |
113 </condition> |
113 </condition> |
114 |
114 |
115 <property name="android-jar" value="${sdk-folder}/android.jar" /> |
115 <property name="android-jar" value="${sdk-folder}/android.jar" /> |
116 |
116 |
|
117 <property name="javadoc-output" value="doc/javadoc" /> |
|
118 |
117 <!-- Rules --> |
119 <!-- Rules --> |
118 |
120 |
119 <!-- Create the output directories if they don't exist yet. --> |
121 <!-- Create the output directories if they don't exist yet. --> |
120 <target name="dirs"> |
122 <target name="dirs"> |
121 <echo>Creating output directories if needed...</echo> |
123 <echo>Creating output directories if needed...</echo> |
122 <mkdir dir="${outdir}" /> |
124 <mkdir dir="${outdir}" /> |
123 <mkdir dir="${outdir-classes}" /> |
125 <mkdir dir="${outdir-classes}" /> |
|
126 <mkdir dir="${javadoc-output}" /> |
124 </target> |
127 </target> |
125 |
128 |
126 <!-- Generate the R.java file for this project's resources. --> |
129 <!-- Generate the R.java file for this project's resources. --> |
127 <target name="resource-src" depends="dirs"> |
130 <target name="resource-src" depends="dirs"> |
128 <echo>Generating R.java / Manifest.java from the resources...</echo> |
131 <echo>Generating R.java / Manifest.java from the resources...</echo> |
143 <!-- Generate java classes from .aidl files. --> |
146 <!-- Generate java classes from .aidl files. --> |
144 <target name="aidl" depends="dirs"> |
147 <target name="aidl" depends="dirs"> |
145 <echo>Compiling aidl files into Java classes...</echo> |
148 <echo>Compiling aidl files into Java classes...</echo> |
146 <apply executable="${aidl}" failonerror="true"> |
149 <apply executable="${aidl}" failonerror="true"> |
147 <arg value="-p${android-framework}" /> |
150 <arg value="-p${android-framework}" /> |
|
151 <arg value="-p${basedir}/project.aidl"/> |
148 <arg value="-I${srcdir}" /> |
152 <arg value="-I${srcdir}" /> |
149 <fileset dir="${srcdir}"> |
153 <fileset dir="${srcdir}"> |
150 <include name="**/*.aidl"/> |
154 <include name="**/*.aidl"/> |
151 </fileset> |
155 </fileset> |
152 </apply> |
156 </apply> |
|
157 |
153 </target> |
158 </target> |
154 |
159 |
155 <!-- Compile this project's .java files into .class files. --> |
160 <!-- Compile this project's .java files into .class files. --> |
156 <target name="compile" depends="dirs, resource-src, aidl"> |
161 <target name="compile" depends="dirs, resource-src, aidl"> |
157 <javac encoding="ascii" target="1.5" debug="true" extdirs="" |
162 <javac encoding="ascii" target="1.5" debug="true" extdirs="" |
242 </exec> |
247 </exec> |
243 </target> |
248 </target> |
244 |
249 |
245 <!-- Package the application without signing it. |
250 <!-- Package the application without signing it. |
246 This allows for the application to be signed later with an official publishing key. --> |
251 This allows for the application to be signed later with an official publishing key. --> |
247 <target name="release" depends="dex, package-res"> |
252 <target name="release" depends="dex, package-res" |
|
253 description="Package the application without signing it. |
|
254 This allows for the application to be signed later with an official publishing key."> |
248 <echo>Packaging ${out-unsigned-package} for release...</echo> |
255 <echo>Packaging ${out-unsigned-package} for release...</echo> |
249 <exec executable="${apk-builder}" failonerror="true"> |
256 <exec executable="${apk-builder}" failonerror="true"> |
250 <arg value="${out-unsigned-package-ospath}" /> |
257 <arg value="${out-unsigned-package-ospath}" /> |
251 <arg value="-u" /> |
258 <arg value="-u" /> |
252 <arg value="-z" /> |
259 <arg value="-z" /> |
262 </exec> |
269 </exec> |
263 <echo>It will need to be signed with jarsigner before being published.</echo> |
270 <echo>It will need to be signed with jarsigner before being published.</echo> |
264 </target> |
271 </target> |
265 |
272 |
266 <!-- Install the package on the default emulator --> |
273 <!-- Install the package on the default emulator --> |
267 <target name="install" depends="debug"> |
274 <target name="install" depends="debug" |
|
275 description="Install the package on the default emulator"> |
268 <echo>Installing ${out-debug-package} onto default emulator...</echo> |
276 <echo>Installing ${out-debug-package} onto default emulator...</echo> |
269 <exec executable="${adb}" failonerror="true"> |
277 <exec executable="${adb}" failonerror="true"> |
270 <arg value="install" /> |
278 <arg value="install" /> |
271 <arg value="${out-debug-package}" /> |
279 <arg value="${out-debug-package}" /> |
272 </exec> |
280 </exec> |
279 <arg value="-r" /> |
287 <arg value="-r" /> |
280 <arg value="${out-debug-package}" /> |
288 <arg value="${out-debug-package}" /> |
281 </exec> |
289 </exec> |
282 </target> |
290 </target> |
283 |
291 |
284 <!-- Uinstall the package from the default emulator --> |
292 <!-- Uninstall the package from the default emulator --> |
285 <target name="uninstall"> |
293 <target name="uninstall" |
|
294 description="Uninstall the package from the default emulator"> |
286 <echo>Uninstalling ${application-package} from the default emulator...</echo> |
295 <echo>Uninstalling ${application-package} from the default emulator...</echo> |
287 <exec executable="${adb}" failonerror="true"> |
296 <exec executable="${adb}" failonerror="true"> |
288 <arg value="uninstall" /> |
297 <arg value="uninstall" /> |
289 <arg value="${application-package}" /> |
298 <arg value="${application-package}" /> |
290 </exec> |
299 </exec> |
293 <target name="clean" |
302 <target name="clean" |
294 description="Delete old build and dist directories"> |
303 description="Delete old build and dist directories"> |
295 <delete verbose="false" dir="${outdir}"/> |
304 <delete verbose="false" dir="${outdir}"/> |
296 </target> |
305 </target> |
297 |
306 |
298 |
307 <target name="javadoc" depends="aidl" |
|
308 description="Build the javadoc"> |
|
309 <javadoc sourcepath="${srcdir}" destdir="${javadoc-output}"> |
|
310 <classpath> |
|
311 <fileset dir="${external-libs}" includes="*.jar" /> |
|
312 </classpath> |
|
313 </javadoc> |
|
314 </target> |
299 |
315 |
300 </project> |
316 </project> |