/
build.xml
56 lines (45 loc) · 1.79 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="UTF-8"?>
<project default="build" name="Create .zip file for core">
<property environment="env" />
<!-- path to the main processing repo -->
<property name="processing.dir" value="../../processing" />
<property name="core.jar.path" value="../android-core.zip" />
<!-- oh ant, you're so cute and convoluted -->
<target name="build" depends="sdk_chatter,actual_build" />
<target name="sdk_chatter" unless="env.ANDROID_SDK">
<echo message="ANDROID_SDK not set, skipping build of android-core.zip" />
</target>
<target name="sdk_whining">
<available file="${env.ANDROID_SDK}/platforms/android-15/android.jar"
property="andoid-jar-present" />
<fail unless="andoid-jar-present"
message="Android SDK 10 could not be found in ${env.ANDROID_SDK}/platforms/android-15/android.jar" />
</target>
<target name="actual_build" if="env.ANDROID_SDK">
<taskdef name="methods"
classname="PAppletMethods"
classpath="${processing.dir}/core/methods/methods.jar" />
<methods dir="${basedir}/src/processing/core" recorder="false" />
<mkdir dir="bin" />
<javac source="1.7"
target="1.7"
encoding="UTF-8"
includeAntRuntime="false"
classpath="library/cardboard.jar"
bootclasspath="${env.ANDROID_SDK}/platforms/android-19/android.jar"
srcdir="src" destdir="bin" />
<!-- Copy the shaders to the bin folder.
Eclipse does this automatically. -->
<copy todir="bin">
<fileset dir="src">
<include name="processing/opengl/shaders/*.glsl" />
</fileset>
</copy>
<jar basedir="bin" destfile="${core.jar.path}" />
</target>
<target name="clean"
description="Clean out the build directories">
<delete dir="bin" />
<delete file="${core.jar.path}" />
</target>
</project>