Files
processing4/android/build.xml

122 lines
3.7 KiB
XML

<?xml version="1.0"?>
<project name="Android Mode for Processing" default="build">
<!-- path to the main processing repo -->
<property name="processing.dir" value=".." />
<property name="core.jar.path" value="android-core.zip" />
<property name="mode.jar.path" value="mode/AndroidMode.jar" />
<property name="mode.dist.path" value="release/AndroidMode.zip" />
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="${mode.jar.path}" />
<!-- clean the core.jar project for Android -->
<subant buildpath="core" target="clean"/>
</target>
<target name="compile" description="Compile sources">
<!-- build the core.jar file for Android -->
<subant buildpath="core" target="build"/>
<condition property="core-built">
<available file="${processing.dir}/core/library/core.jar" />
</condition>
<fail unless="core-built"
message="Please build the core library first and make sure it sits in ${processing.dir}/core/library/core.jar" />
<mkdir dir="bin" />
<!-- env used to set classpath below -->
<property environment="env" />
<!--
classpath="../core/library/core.jar; lib/ant.jar; lib/ant-launcher.jar; lib/antlr.jar; lib/apple.jar; lib/jdt-core.jar; lib/jna.jar; lib/org-netbeans-swing-outline.jar;lib/com.ibm.icu_4.4.2.v20110823.jar;lib/jdi.jar;lib/jdimodel.jar;lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar"
-->
<javac source="1.6"
target="1.6"
destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
classpath="${processing.dir}/core/library/core.jar;
${processing.dir}/app/pde.jar;
${processing.dir}/app/lib/ant.jar;
${processing.dir}/app/lib/ant-launcher.jar;
${processing.dir}/app/lib/antlr.jar"
debug="on">
<src path="src" />
</javac>
</target>
<target name="build" depends="compile" description="Build Android mode">
<jar basedir="bin" destfile="${mode.jar.path}" />
</target>
<!-- now that this is standalone, probably not really needed -->
<!--
<target name="android-dist-check">
-->
<!-- ensure that the android-core.zip file has been built -->
<!--
<available file="${core.jar.path}"
property="android-core-present" />
-->
<!--<echo message="${target.path}/modes/android/android-core.zip" />-->
<!--
<fail unless="android-core-present"
message="android-core.zip was not built, but is required for dist. Install the Android tools, set ANDROID_SDK, and try again." />
</target>
-->
<target name="dist"
depends="build"
description="Create AndroidMode.zip and AndroidMode.txt">
<mkdir dir="release" />
<zip destfile="${mode.dist.path}">
<zipfileset dir="." prefix="AndroidMode">
<include name="android-core.zip" />
<include name="mode.properties" />
<include name="examples/**" />
<include name="icons/**" />
<include name="theme/**" />
<!-- no extra keywords file
<include name="keywords.txt" />
-->
<exclude name="**/._*" />
</zipfileset>
</zip>
<copy file="mode.properties"
tofile="release/AndroidMode.txt" />
</target>
<target name="upload" depends="dist" description="Upload to processing.org">
<!--
<scp todir="${user}@processing.org:/var/www/web/download/">
<fileset dir="release">
<include name="AndroidMode.txt" />
<include name="AndroidMode.zip" />
</fileset>
</scp>
-->
<exec executable="scp">
<arg value="release/AndroidMode.txt" />
<arg value="${user.name}@processing.org:/var/www/android/" />
</exec>
<exec executable="scp">
<arg value="release/AndroidMode.zip" />
<arg value="${user.name}@processing.org:/var/www/android/" />
</exec>
</target>
</project>