Permalink
Fetching contributors…
Cannot retrieve contributors at this time
123 lines (99 sloc) 4.15 KB
<?xml version="1.0"?>
<project name="Android Mode for Processing" default="build">
<!-- path to the main processing repo -->
<property name="processing.dir" value="../processing" />
<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" />
<property name="tools.jar.path" value="mode/tools.jar" />
<target name="clean" depends="subprojects-clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="${mode.jar.path}" />
</target>
<target name="compile" depends="subprojects-build" description="Compile sources">
<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.7"
target="1.7"
destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
classpath="${processing.dir}/core/library/core.jar;
${processing.dir}/java/mode/JavaMode.jar;
${processing.dir}/java/mode/antlr.jar;
${processing.dir}/java/mode/org.eclipse.core.runtime.jar;
${processing.dir}/app/pde.jar;
${processing.dir}/app/lib/ant.jar;
${processing.dir}/app/lib/ant-launcher.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" />
<copy todir="mode">
<fileset dir="core/library">
<include name="*.jar" />
</fileset>
</copy>
<zip destfile="${mode.dist.path}">
<zipfileset dir="." prefix="AndroidMode">
<include name="android-core.zip" />
<include name="mode.properties" />
<include name="mode/**" />
<include name="templates/**" />
<include name="examples/**" />
<include name="icons/**" />
<include name="theme/**" />
<include name="libraries/cardboard/library.properties" />
<include name="libraries/cardboard/examples/**" />
<include name="libraries/cardboard/gvrsdk/**" />
<include name="libraries/cardboard/lib/**" />
<include name="libraries/cardboard/library/**" />
<include name="libraries/cardboard/src/**" />
<exclude name="**/._*" />
</zipfileset>
</zip>
<copy file="mode.properties"
tofile="release/AndroidMode.txt" />
</target>
<!-- - - - - - - - - - - - - - - - - - -->
<!-- Subprojects: Core, Libraries -->
<!-- - - - - - - - - - - - - - - - - - -->
<target name="subprojects-clean">
<subant buildpath="core" target="clean"/>
<subant buildpath="libraries/cardboard" target="clean"/>
</target>
<target name="subprojects-build">
<subant buildpath="core" target="build"/>
<subant buildpath="libraries/cardboard" target="build"/>
</target>
</project>