Closed GoogleCodeExporter closed 8 years ago
The easiest way is probably just to export a jar from eclipse, but if you're
intrepid you could add these lines to build.xml (after "<setup />"):
<property name="dist.dir" value="dist" />
<property name="src.dir" value="src" />
<property name="jar.name" value="AdWhirlSDK_Android_${adwhirl_sdk_version}" />
<property name="jar.file" value="${dist.dir}/${jar.name}.jar" />
<property name="zip.file" value="${dist.dir}/${jar.name}.zip" />
<property name="bin.dir" value="bin" />
<property name="assets.dir" value="com/adwhirl/assets" />
<property name="README.dir" value="${src.dir}/com/adwhirl" />
<target name="adwhirl.clean" description="Cleans bin and dist directories.">
<delete dir="${bin.dir}" includeEmptyDirs="true" />
<delete dir="${dist.dir}" includeEmptyDirs="true" />
</target>
<target name="jar" depends="adwhirl.clean, compile" description="Builds a jar suitable
for usage in an Android application.">
<jar destfile="${jar.file}" filesonly="true">
<fileset dir="${bin.dir}/classes" includes="**/*.class"
excludes="**/Invoker.class **/R*.class" />
<fileset dir="${src.dir}" includes="${assets.dir}/*" />
</jar>
</target>
<target name="dist" depends="jar" description="Builds the distribution zip.">
<zip destfile="${zip.file}">
<fileset dir="${dist.dir}" includes="**/*" />
<fileset dir="${README.dir}" includes="README" />
</zip>
<delete file="${jar.file}" />
</target>
And add this line to your build.properties file (maybe editing the version
number):
adwhirl_sdk_version=3.0.0.mine
That way it's a simple `ant jar` to build a new one. These changes will be
available when I next update the android sdk.
Original comment by wesgood...@google.com
on 11 Aug 2011 at 7:58
Original issue reported on code.google.com by
chris.me...@gmail.com
on 1 Aug 2011 at 10:44