Skip to content

Instantly share code, notes, and snippets.

@kimukou kimukou/build.xml
Last active Sep 28, 2015

What would you like to do?
android build.xml setting
<!--//add task -->
<property name="" location="${out.dir}/../${}_${}.apk" />
<target name="aftert-copy">
<copy file="${}" tofile="${}"/>
<target name="aftert-copy-install" depends="uninstall">
<exec executable="${adb}" failonerror="true">
<arg line="${adb.device.arg}" />
<arg value="install" />
<arg value="-r" />
<arg path="${}" />
<!--//library project -->
<property name="android.library.dir" location="../libP" />
<condition property="tested.project.absolute.dir" value="../testP">
<isset property="tested.project.absolute.dir"/>
<target name="con">
<condition property="library.project.exist">
<available file="${android.library.dir}" />
<available file="${tested.project.absolute.dir}/bin/classes" />
<target name="-pre-compile" depends="con" if="library.project.exist">
<subant failonerror="true">
<fileset dir="${android.library.dir}" includes="build.xml" />
<target name="clean" />
<target name="debug" />
<property name="extensible.classpath" value="${android.library.dir}/bin/classes:${tested.project.absolute.dir}/bin/classes"/>
<!--//groovy testing project (yet not running using discobot.jar and r16SDK) -->
<target name="-post-compile">
<antcall target="compile_groovy"/>
<path id="g.jar.libs.ref">
<fileset dir="${jar.libs.absolute.dir}" includes="*.jar" />
<taskdef name="groovyc"
<target name="compile_groovy">
<path id="g.jar.libs.ref.cmp">
<fileset dir="${android.library.dir}/bin/classes" includes="*.class"/>
<fileset dir="${tested.project.absolute.dir}/bin/classes" includes="*.class"/>
<fileset dir="${out.classes.absolute.dir}" includes="*.class"/>
<fileset dir="${tested.project.absolute.dir}/libs" includes="*.jar" />
<pathelement path="${android.jar}"/>
<path refid="g.jar.libs.ref"/>
<mkdir dir="${out.classes.absolute.dir}"/>
<groovyc encoding="${java.encoding}"
<javac encoding="${java.encoding}" target="${}" debug="on" >
<classpath refid="g.jar.libs.ref.cmp"/>
<include name="**/*.java" />
sdk.dir=<<USE DEFAULT>>
1) android update project -p ./
2) move to use jar => libs
(but exclude not use jar)
<<using Android Library Project >>
android update project -p ./ -l ./../libP
android update project -p ./
is OK
<<using Android Test Project >>
OK) android update test-project -m ../MainP -p ./
NG) android update test-project -m ../MainP -p ./ -l ./../lib
ref cmd)
ref android library project)
using sample::
only eclipse issue.
but ant build is OK
ref metadeta)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.