123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- *** GENERATED FROM project.xml - DO NOT EDIT ***
- *** EDIT ../build.xml INSTEAD ***
-
- For the purpose of easier reading the script
- is divided into following sections:
-
- - initialization
- - compilation
- - jar
- - execution
- - debugging
- - javadoc
- - junit compilation
- - junit execution
- - junit debugging
- - cleanup
-
- -->
- <project xmlns:androidproject1="http://www.netbeans.org/ns/android-project/1" basedir=".." default="default" name="ActivityRecorder-impl">
- <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
- <!--
- ======================
- INITIALIZATION SECTION
- ======================
- -->
- <target name="-pre-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="-pre-init" name="-init-private">
- <property file="nbproject/private/config.properties"/>
- <property file="nbproject/private/configs/${config}.properties"/>
- <property file="nbproject/private/private.properties"/>
- </target>
- <target depends="-pre-init,-init-private" name="-init-user">
- <property file="${user.properties.file}"/>
- <!-- The two properties below are usually overridden -->
- <!-- by the active platform. Just a fallback. -->
- <property name="default.javac.source" value="1.4"/>
- <property name="default.javac.target" value="1.4"/>
- </target>
- <target depends="-pre-init,-init-private,-init-user" name="-init-project">
- <property file="nbproject/configs/${config}.properties"/>
- <property file="nbproject/project.properties"/>
- </target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-init-macrodef-property" name="-do-init">
- <androidproject1:property name="platform.home" value="platforms.${platform.active}.home"/>
- <androidproject1:property name="platform.bootcp" value="platforms.${platform.active}.bootclasspath"/>
- <androidproject1:property name="platform.bootcp0" value="platforms.${platform.active}.bootclasspath0"/>
- <androidproject1:property name="platform.bootcp1" value="platforms.${platform.active}.bootclasspath1"/>
- <androidproject1:property name="aapt" value="platforms.${platform.active}.aapt"/>
- <androidproject1:property name="adb" value="platforms.${platform.active}.adb"/>
- <androidproject1:property name="dx" value="platforms.${platform.active}.dx"/>
- <androidproject1:property name="emulator" value="platforms.${platform.active}.emulator"/>
- <androidproject1:property name="apkbuilder" value="platforms.${platform.active}.apkbuilder"/>
- <condition property="bootclasspath1.available">
- <and>
- <isset property="platforms.${platform.active}.bootclasspath1"/>
- <not>
- <equals arg1="${platform.bootcp1}" arg2="" trim="true"/>
- </not>
- </and>
- </condition>
- <condition property="no.bootclasspath1.available">
- <not>
- <isset property="bootclasspath1.available"/>
- </not>
- </condition>
- <condition property="assets.available">
- <and>
- <isset property="${assets.dir}"/>
- <not>
- <equals arg1="${assets.dir}" arg2="" trim="true"/>
- </not>
- <available file="${assets.dir}" property="assets.available"/>
- </and>
- </condition>
- <available file="${manifest.file}" property="manifest.available"/>
- <condition property="have.tests">
- <or>
- <available file="${test.src.dir}"/>
- </or>
- </condition>
- <condition property="have.sources">
- <or>
- <available file="${src.dir}"/>
- </or>
- </condition>
- <condition property="netbeans.home+have.tests">
- <and>
- <isset property="netbeans.home"/>
- <isset property="have.tests"/>
- </and>
- </condition>
- <condition property="no.javadoc.preview">
- <and>
- <isset property="javadoc.preview"/>
- <isfalse value="${javadoc.preview}"/>
- </and>
- </condition>
- <property name="run.jvmargs" value=""/>
- <property name="javac.compilerargs" value=""/>
- <property name="work.dir" value="${basedir}"/>
- <condition property="no.deps">
- <and>
- <istrue value="${no.dependencies}"/>
- </and>
- </condition>
- <property name="javac.debug" value="true"/>
- <property name="javadoc.preview" value="true"/>
- <property name="application.args" value=""/>
- <property name="source.encoding" value="${file.encoding}"/>
- <condition property="javadoc.encoding.used" value="${javadoc.encoding}">
- <and>
- <isset property="javadoc.encoding"/>
- <not>
- <equals arg1="${javadoc.encoding}" arg2=""/>
- </not>
- </and>
- </condition>
- <property name="javadoc.encoding.used" value="${source.encoding}"/>
- <property name="includes" value="**"/>
- <property name="excludes" value=""/>
- <property name="do.depend" value="false"/>
- <condition property="do.depend.true">
- <istrue value="${do.depend}"/>
- </condition>
- <condition else="" property="javac.compilerargs.jaxws" value="-Djava.endorsed.dirs='${jaxws.endorsed.dir}'">
- <and>
- <isset property="jaxws.endorsed.dir"/>
- <available file="nbproject/jaxws-build.xml"/>
- </and>
- </condition>
- <property name="screen.skin" value="HVGA"/>
- <property name="emulator.options" value=""/>
- <property name="android.target.device" value=""/>
- <condition property="do.start.app.false">
- <and>
- <isset property="do.start.app"/>
- <isfalse value="${do.start.app}"/>
- </and>
- </condition>
- </target>
- <target name="-post-init">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="-pre-init,-init-private,-init-user,-init-project,-do-init" name="-init-check">
- <fail unless="src.dir">Must set src.dir</fail>
- <fail unless="test.src.dir">Must set test.src.dir</fail>
- <fail unless="build.dir">Must set build.dir</fail>
- <fail unless="dist.dir">Must set dist.dir</fail>
- <fail unless="build.classes.dir">Must set build.classes.dir</fail>
- <fail unless="dist.javadoc.dir">Must set dist.javadoc.dir</fail>
- <fail unless="build.test.classes.dir">Must set build.test.classes.dir</fail>
- <fail unless="build.test.results.dir">Must set build.test.results.dir</fail>
- <fail unless="build.classes.excludes">Must set build.classes.excludes</fail>
- <fail unless="dist.apk">Must set dist.apk</fail>
- </target>
- <target name="-init-macrodef-property">
- <macrodef name="property" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute name="name"/>
- <attribute name="value"/>
- <sequential>
- <property name="@{name}" value="${@{value}}"/>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-javac">
- <macrodef name="javac" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${src.dir}" name="srcdir"/>
- <attribute default="${build.classes.dir}" name="destdir"/>
- <attribute default="${javac.classpath}" name="classpath"/>
- <attribute default="${includes}" name="includes"/>
- <attribute default="${excludes}" name="excludes"/>
- <attribute default="${javac.debug}" name="debug"/>
- <attribute default="" name="sourcepath"/>
- <element name="customize" optional="true"/>
- <sequential>
- <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}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <compilerarg line="${javac.compilerargs} ${javac.compilerargs.jaxws}"/>
- <customize/>
- </javac>
- </sequential>
- </macrodef>
- <macrodef name="depend" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${src.dir}" name="srcdir"/>
- <attribute default="${build.classes.dir}" name="destdir"/>
- <attribute default="${javac.classpath}" name="classpath"/>
- <sequential>
- <depend cache="${build.dir}/depcache" destdir="@{destdir}" excludes="${excludes}" includes="${includes}" srcdir="@{srcdir}">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- </depend>
- </sequential>
- </macrodef>
- <macrodef name="force-recompile" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${build.classes.dir}" name="destdir"/>
- <sequential>
- <fail unless="javac.includes">Must set javac.includes</fail>
- <pathconvert pathsep="," property="javac.includes.binary">
- <path>
- <filelist dir="@{destdir}" files="${javac.includes}"/>
- </path>
- <globmapper from="*.java" to="*.class"/>
- </pathconvert>
- <delete>
- <files includes="${javac.includes.binary}"/>
- </delete>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-junit">
- <macrodef name="junit" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${includes}" name="includes"/>
- <attribute default="${excludes}" name="excludes"/>
- <attribute default="**" name="testincludes"/>
- <sequential>
- <junit dir="${work.dir}" errorproperty="tests.failed" failureproperty="tests.failed" fork="true" showoutput="true">
- <batchtest todir="${build.test.results.dir}">
- <fileset dir="${test.src.dir}" excludes="@{excludes},${excludes}" includes="@{includes}">
- <filename name="@{testincludes}"/>
- </fileset>
- </batchtest>
- <classpath>
- <path path="${run.test.classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper from="test-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <formatter type="brief" usefile="false"/>
- <formatter type="xml"/>
- <jvmarg line="${run.jvmargs}"/>
- </junit>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-macrodef-nbjpda">
- <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${main.activity}" name="name"/>
- <attribute default="${debug.classpath}" name="classpath"/>
- <attribute default="" name="stopclassname"/>
- <sequential>
- <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <bootclasspath>
- <path path="${platform.bootcp}"/>
- </bootclasspath>
- </nbjpdastart>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdaconnect" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${main.activity}" name="name"/>
- <attribute default="${debug.classpath}" name="classpath"/>
- <sequential>
- <nbjpdaconnect address="${local.debug.port}" name="@{name}" transport="dt_socket">
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <bootclasspath>
- <path path="${platform.bootcp}"/>
- </bootclasspath>
- </nbjpdaconnect>
- </sequential>
- </macrodef>
- <macrodef name="nbjpdareload" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${build.classes.dir}" name="dir"/>
- <sequential>
- <nbjpdareload>
- <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
- </nbjpdareload>
- </sequential>
- </macrodef>
- </target>
- <target name="-init-debug-args">
- <property name="version-output" value="java version "${ant.java.version}"/>
- <condition property="have-jdk-older-than-1.4">
- <or>
- <contains string="${version-output}" substring="java version "1.0"/>
- <contains string="${version-output}" substring="java version "1.1"/>
- <contains string="${version-output}" substring="java version "1.2"/>
- <contains string="${version-output}" substring="java version "1.3"/>
- </or>
- </condition>
- <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
- <istrue value="${have-jdk-older-than-1.4}"/>
- </condition>
- </target>
- <target depends="-init-debug-args" name="-init-macrodef-debug">
- <macrodef name="debug" uri="http://www.netbeans.org/ns/android-project/1">
- <attribute default="${main.activity}" name="classname"/>
- <attribute default="${debug.classpath}" name="classpath"/>
- <element name="customize" optional="true"/>
- <sequential>
- <java classname="@{classname}" dir="${work.dir}" fork="true">
- <jvmarg line="${debug-args-line}"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
- <jvmarg line="${run.jvmargs}"/>
- <classpath>
- <path path="@{classpath}"/>
- </classpath>
- <syspropertyset>
- <propertyref prefix="run-sys-prop."/>
- <mapper from="run-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <customize/>
- </java>
- </sequential>
- </macrodef>
- </target>
- <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"/>
- <!--
- ===================
- COMPILATION SECTION
- ===================
- -->
- <target depends="init" name="deps-jar" unless="no.deps"/>
- <target depends="init,deps-jar" name="-pre-pre-compile">
- <mkdir dir="${build.classes.dir}"/>
- </target>
- <target name="-pre-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target if="do.depend.true" name="-compile-depend">
- <androidproject1:depend/>
- </target>
- <target depends="init,-pre-pre-compile,-pre-compile" name="-res-compile" unless="bootclasspath1.available">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-m"/>
- <arg value="-J"/>
- <arg value="${src.dir}"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp}"/>
- </exec>
- </target>
- <target depends="init,-pre-pre-compile,-pre-compile" if="bootclasspath1.available" name="-res-compile1">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-m"/>
- <arg value="-J"/>
- <arg value="${src.dir}"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp0}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp1}"/>
- </exec>
- </target>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile" name="-idl-compile"/>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-compile-depend" if="have.sources" name="-do-compile">
- <androidproject1:javac/>
- <copy todir="${build.classes.dir}">
- <fileset dir="${src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </copy>
- </target>
- <target name="-post-compile">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <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"/>
- <target name="-pre-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-jar,-pre-pre-compile" name="-do-compile-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <androidproject1:force-recompile/>
- <androidproject1:javac excludes="" includes="${javac.includes}" sourcepath="${src.dir}"/>
- </target>
- <target name="-post-compile-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
- <!--
- ====================
- JAR BUILDING SECTION
- ====================
- -->
- <target depends="init" name="-pre-pre-jar">
- <dirname file="${dist.apk}" property="dist.apk.dir"/>
- <mkdir dir="${dist.apk.dir}"/>
- </target>
- <target name="-pre-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target name="-post-jar">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" name="-dex">
- <exec executable="${dx}" failonerror="true">
- <arg value="--dex"/>
- <arg value="--output=${basedir}/${intermediate.dex}"/>
- <arg value="--positions=lines"/>
- <arg path="${build.classes.dir}"/>
- </exec>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="assets.available" name="-package-res-and-assets" unless="bootclasspath1.available">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-f"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-A"/>
- <arg value="${asset.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp}"/>
- <arg value="-F"/>
- <arg value="${dist.apk}_"/>
- </exec>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="assets.available" name="-package-res-and-assets1" unless="no.bootclasspath1.available">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-f"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-A"/>
- <arg value="${asset.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp0}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp1}"/>
- <arg value="-F"/>
- <arg value="${dist.apk}_"/>
- </exec>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="no.bootclasspath1.available" name="-package-res-no-assets" unless="assets.available">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-f"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp}"/>
- <arg value="-F"/>
- <arg value="${dist.apk}_"/>
- </exec>
- </target>
- <target depends="init,compile,-pre-pre-jar,-pre-jar" if="bootclasspath1.available" name="-package-res-no-assets1" unless="assets.available">
- <exec executable="${aapt}" failonerror="true">
- <arg value="package"/>
- <arg value="-f"/>
- <arg value="-M"/>
- <arg value="AndroidManifest.xml"/>
- <arg value="-S"/>
- <arg value="${resource.dir}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp0}"/>
- <arg value="-I"/>
- <arg value="${platform.bootcp1}"/>
- <arg value="-F"/>
- <arg value="${dist.apk}_"/>
- </exec>
- </target>
- <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">
- <dirname file="${intermediate.dex}" property="package-dex.dex.folder"/>
- <basename file="${intermediate.dex}" property="package-dex.dex.file"/>
- <zip destfile="${dist.apk}_" update="true">
- <fileset dir="${package-dex.dex.folder}" includes="${package-dex.dex.file}"/>
- </zip>
- </target>
- <target depends="init,-package-res-and-assets,-package-res-no-assets,-package-dex" name="-sign">
- <exec executable="${apkbuilder}" failonerror="true">
- <arg value="${basedir}/${dist.apk}"/>
- <arg value="-z"/>
- <arg value="${basedir}/${dist.apk}_"/>
- </exec>
- <delete file="${dist.apk}_"/>
- </target>
- <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"/>
- <!--
- =================
- EXECUTION SECTION
- =================
- -->
- <target depends="init,compile,jar,-start-emulator,-wait-for-emulator,-install-app,-run-app" description="Run a main activity." name="run"/>
- <target depends="init,compile,jar,-start-emulator,-wait-for-emulator,-install-app" name="-run-app" unless="do.start.app.false">
- <taskdef classname="org.netbeans.modules.android.ant.AndroidManifestParse" classpath="${libs.AndroidAntTasks.classpath}" name="android-manifest-parse"/>
- <android-manifest-parse mainActivityProperty="main.activity" manifestFile="AndroidManifest.xml"/>
- <echo message="About to start ${main.component}/${main.activity}"/>
- <exec executable="${adb}">
- <arg line="${android.target.device}"/>
- <arg value="shell"/>
- <arg value="am start -n ${main.component}/${main.activity}"/>
- </exec>
- </target>
- <target depends="init,compile,jar" name="-emulator-running">
- <exec executable="${adb}" outputproperty="emulator-running.out" resultproperty="is.emulator.running.tmp">
- <arg line="${android.target.device}"/>
- <arg value="shell"/>
- <arg value="date"/>
- </exec>
- <condition property="is.emulator.running">
- <not>
- <isfailure code="${is.emulator.running.tmp}"/>
- </not>
- </condition>
- </target>
- <target depends="init,compile,jar,-emulator-running" name="-start-emulator" unless="is.emulator.running">
- <exec executable="${adb}">
- <arg value="kill-server"/>
- </exec>
- <fail unless="android.target.avd">Must set android.target.avd</fail>
- <exec executable="${emulator}" spawn="true">
- <arg value="-skin"/>
- <arg value="${screen.skin}"/>
- <arg value="-avd"/>
- <arg value="${android.target.avd}"/>
- <arg line="${emulator.options}"/>
- </exec>
- </target>
- <target depends="init,compile,jar,-start-emulator" name="-wait-for-emulator">
- <taskdef classname="org.netbeans.modules.android.ant.AdbPackageManagerWait" classpath="${libs.AndroidAntTasks.classpath}" name="adb-pm-wait"/>
- <adb-pm-wait adb="${adb}" deviceArgs="${android.target.device}"/>
- </target>
- <target depends="init,compile,jar,-start-emulator,-wait-for-emulator" name="-install-app">
- <exec executable="${adb}">
- <arg line="${android.target.device}"/>
- <arg value="install"/>
- <arg value="-r"/>
- <arg value="${dist.apk}"/>
- </exec>
- </target>
- <target name="-do-not-recompile">
- <property name="javac.includes.binary" value=""/>
- </target>
- <!--
- =================
- DEBUGGING SECTION
- =================
- -->
- <target depends="init,-debug-start-debuggee" if="netbeans.home" name="-debug-start-debugger">
- <androidproject1:nbjpdaconnect/>
- </target>
- <target depends="init,compile,-start-emulator,-wait-for-emulator,-install-app" name="-debug-start-debuggee">
- <taskdef classname="org.netbeans.modules.android.ant.AndroidManifestParse" classpath="${libs.AndroidAntTasks.classpath}" name="android-manifest-parse"/>
- <android-manifest-parse mainActivityProperty="main.activity" manifestFile="AndroidManifest.xml"/>
- <echo message="About to start ${main.component}/${main.activity}"/>
- <exec executable="${adb}">
- <arg line="${android.target.device}"/>
- <arg value="shell"/>
- <arg value="am start -D -n ${main.component}/${main.activity}"/>
- </exec>
- <getdebuggerport addressProperty="local.debug.port" app="${main.component}"/>
- </target>
- <target depends="init,compile,-debug-start-debuggee,-debug-start-debugger" description="Debug project in IDE." if="netbeans.home" name="debug"/>
- <!--
- ===============
- JAVADOC SECTION
- ===============
- -->
- <target depends="init" name="-javadoc-build">
- <mkdir dir="${dist.javadoc.dir}"/>
- <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}">
- <classpath>
- <path path="${javac.classpath}"/>
- </classpath>
- <fileset dir="${src.dir}" excludes="${excludes}" includes="${includes}">
- <filename name="**/*.java"/>
- </fileset>
- </javadoc>
- </target>
- <target depends="init,-javadoc-build" if="netbeans.home" name="-javadoc-browse" unless="no.javadoc.preview">
- <nbbrowse file="${dist.javadoc.dir}/index.html"/>
- </target>
- <target depends="init,-javadoc-build,-javadoc-browse" description="Build Javadoc." name="javadoc"/>
- <!--
- =========================
- JUNIT COMPILATION SECTION
- =========================
- -->
- <target depends="init,compile" if="have.tests" name="-pre-pre-compile-test">
- <mkdir dir="${build.test.classes.dir}"/>
- </target>
- <target name="-pre-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target if="do.depend.true" name="-compile-test-depend">
- <androidproject1:depend classpath="${javac.test.classpath}" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-compile-test-depend" if="have.tests" name="-do-compile-test">
- <androidproject1:javac classpath="${javac.test.classpath}" debug="true" destdir="${build.test.classes.dir}" srcdir="${test.src.dir}"/>
- <copy todir="${build.test.classes.dir}">
- <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </copy>
- </target>
- <target name="-post-compile-test">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test,-do-compile-test,-post-compile-test" name="compile-test"/>
- <target name="-pre-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single" if="have.tests" name="-do-compile-test-single">
- <fail unless="javac.includes">Must select some files in the IDE or set javac.includes</fail>
- <androidproject1:force-recompile destdir="${build.test.classes.dir}"/>
- <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}"/>
- <copy todir="${build.test.classes.dir}">
- <fileset dir="${test.src.dir}" excludes="${build.classes.excludes},${excludes}" includes="${includes}"/>
- </copy>
- </target>
- <target name="-post-compile-test-single">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,compile,-pre-pre-compile-test,-pre-compile-test-single,-do-compile-test-single,-post-compile-test-single" name="compile-test-single"/>
- <!--
- =======================
- JUNIT EXECUTION SECTION
- =======================
- -->
- <target depends="init" if="have.tests" name="-pre-test-run">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target depends="init,compile-test,-pre-test-run" if="have.tests" name="-do-test-run">
- <androidproject1:junit testincludes="**/*Test.java"/>
- </target>
- <target depends="init,compile-test,-pre-test-run,-do-test-run" if="have.tests" name="-post-test-run">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <target depends="init" if="have.tests" name="test-report"/>
- <target depends="init" if="netbeans.home+have.tests" name="-test-browse"/>
- <target depends="init,compile-test,-pre-test-run,-do-test-run,test-report,-post-test-run,-test-browse" description="Run unit tests." name="test"/>
- <target depends="init" if="have.tests" name="-pre-test-run-single">
- <mkdir dir="${build.test.results.dir}"/>
- </target>
- <target depends="init,compile-test-single,-pre-test-run-single" if="have.tests" name="-do-test-run-single">
- <fail unless="test.includes">Must select some files in the IDE or set test.includes</fail>
- <androidproject1:junit excludes="" includes="${test.includes}"/>
- </target>
- <target depends="init,compile-test-single,-pre-test-run-single,-do-test-run-single" if="have.tests" name="-post-test-run-single">
- <fail if="tests.failed">Some tests failed; see details above.</fail>
- </target>
- <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"/>
- <!--
- =======================
- JUNIT DEBUGGING SECTION
- =======================
- -->
- <target depends="init,compile-test" if="have.tests" name="-debug-start-debuggee-test">
- <fail unless="test.class">Must select one file in the IDE or set test.class</fail>
- <property location="${build.test.results.dir}/TEST-${test.class}.xml" name="test.report.file"/>
- <delete file="${test.report.file}"/>
- <mkdir dir="${build.test.results.dir}"/>
- <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}">
- <customize>
- <syspropertyset>
- <propertyref prefix="test-sys-prop."/>
- <mapper from="test-sys-prop.*" to="*" type="glob"/>
- </syspropertyset>
- <arg value="${test.class}"/>
- <arg value="showoutput=true"/>
- <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.BriefJUnitResultFormatter"/>
- <arg value="formatter=org.apache.tools.ant.taskdefs.optional.junit.XMLJUnitResultFormatter,${test.report.file}"/>
- </customize>
- </androidproject1:debug>
- </target>
- <target depends="init,compile-test" if="netbeans.home+have.tests" name="-debug-start-debugger-test">
- <androidproject1:nbjpdastart classpath="${debug.test.classpath}" name="${test.class}"/>
- </target>
- <target depends="init,-do-not-recompile,compile-test-single,-debug-start-debugger-test,-debug-start-debuggee-test" name="debug-test"/>
- <!--
- ===============
- CLEANUP SECTION
- ===============
- -->
- <target depends="init" name="deps-clean" unless="no.deps"/>
- <target depends="init" name="-do-clean">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- </target>
- <target name="-post-clean">
- <!-- Empty placeholder for easier customization. -->
- <!-- You can override this target in the ../build.xml file. -->
- </target>
- <target depends="init,deps-clean,-do-clean,-post-clean" description="Clean build products." name="clean"/>
- </project>
|