Last active
September 28, 2015 20:58
-
-
Save kimukou/1495328 to your computer and use it in GitHub Desktop.
android build.xml setting
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--//add task --> | |
<property name="out.final.file.change" location="${out.dir}/../${release.app.name}_${release.app.version}.apk" /> | |
<target name="aftert-copy"> | |
<copy file="${out.final.file}" tofile="${out.final.file.change}"/> | |
</target> | |
<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="${out.final.file.change}" /> | |
</exec> | |
</target> | |
<!--//library project --> | |
<!-- | |
<property name="android.library.dir" location="../libP" /> | |
<condition property="tested.project.absolute.dir" value="../testP"> | |
<not> | |
<isset property="tested.project.absolute.dir"/> | |
</not> | |
</condition> | |
<target name="con"> | |
<condition property="library.project.exist"> | |
<and> | |
<available file="${android.library.dir}" /> | |
<available file="${tested.project.absolute.dir}/bin/classes" /> | |
</and> | |
</condition> | |
</target> | |
<target name="-pre-compile" depends="con" if="library.project.exist"> | |
<echo>========[-pre-compile]========</echo> | |
<subant failonerror="true"> | |
<fileset dir="${android.library.dir}" includes="build.xml" /> | |
<target name="clean" /> | |
<target name="debug" /> | |
</subant> | |
<property name="extensible.classpath" value="${android.library.dir}/bin/classes:${tested.project.absolute.dir}/bin/classes"/> | |
<echo>========${extensible.classpath}========</echo> | |
</target> | |
--> | |
<!--//groovy testing project (yet not running using discobot.jar and r16SDK) --> | |
<!-- | |
<target name="-post-compile"> | |
<antcall target="compile_groovy"/> | |
</target> | |
<path id="g.jar.libs.ref"> | |
<fileset dir="${jar.libs.absolute.dir}" includes="*.jar" /> | |
</path> | |
<taskdef name="groovyc" | |
classname="org.codehaus.groovy.ant.Groovyc" | |
classpathref="g.jar.libs.ref" | |
/> | |
<target name="compile_groovy"> | |
<echo>========[compile_groovy]========</echo> | |
<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"/> | |
</path> | |
<mkdir dir="${out.classes.absolute.dir}"/> | |
<groovyc encoding="${java.encoding}" | |
srcdir="${source.dir}" | |
destdir="${out.classes.absolute.dir}" | |
classpathref="g.jar.libs.ref.cmp" | |
> | |
<javac encoding="${java.encoding}" target="${java.target}" debug="on" > | |
<classpath refid="g.jar.libs.ref.cmp"/> | |
<include name="**/*.java" /> | |
</javac> | |
</groovyc> | |
</target> | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdk.dir=<<USE DEFAULT>> | |
key.store=debug.keystore | |
key.alias=key | |
key.store.password=android | |
key.alias.password=android | |
release.app.name=hello | |
release.app.version=v01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) android update project -p ./ | |
2) move to use jar => libs | |
(but exclude not use jar) | |
<<using Android Library Project >> | |
・MainP | |
android update project -p ./ -l ./../libP | |
・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) | |
http://developer.android.com/guide/developing/projects/projects-cmdline.html | |
ref android library project) | |
using sample:: | |
http://d.hatena.ne.jp/tomorrowkey/20100910/1284133106 | |
http://kokufu.blogspot.com/2011/06/android-jar.html | |
http://kokufu.blogspot.com/2011/09/android-project-res-library.html | |
http://kokufu.blogspot.com/2011/08/android-project-is-library-res.html | |
http://stackoverflow.com/questions/3659611/android-library-projects | |
only eclipse issue. | |
but ant build is OK | |
ref metadeta) | |
http://d.hatena.ne.jp/Kazzz/20100225/p1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment