forked from processing/processing-android-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
121 lines (97 loc) · 3.76 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?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" />
<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="mode/**" />
<include name="examples/**" />
<include name="icons/**" />
<include name="theme/**" />
<exclude name="**/._*" />
</zipfileset>
</zip>
<copy file="mode.properties"
tofile="release/AndroidMode.txt" />
</target>
<target name="upload" depends="dist" description="Upload to processing.org">
<!-- Technically more cross-platform compatible, but requires
extra jars in the ant libsfolder. Which is... not. -->
<!--
<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>