Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
130 lines (106 loc) · 4.09 KB
/
Copy pathbuild.xml
File metadata and controls
130 lines (106 loc) · 4.09 KB
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
122
123
124
125
126
127
128
129
130
<?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" 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.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/**" />
<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>