-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
94 lines (78 loc) · 3.06 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
<?xml version="1.0"?>
<project name="Cassette" default="build">
<property name="processing.dir" value="../../processing" />
<property environment="env"/>
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="library/Cassette.jar" />
</target>
<target name="build" depends="sdk_chatter,compile" description="Build audio library for Processing Android" >
<jar basedir="bin" destfile="library/cassette.jar" />
</target>
<target name="sdk_chatter" unless="env.ANDROID_HOME">
<echo message="ANDROID_HOME not set, skipping build." />
</target>
<target name="compile" description="Compile sources">
<condition property="core-built">
<available file="./libs/android-core.jar" />
</condition>
<fail unless="core-built" message="Please build the core library first and make sure it sits in ./libs/android-core.jar" />
<mkdir dir="bin" />
<javac source="1.7"
target="1.7"
srcdir="src" destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
classpath="./libs/android-core.jar;${env.ANDROID_HOME}/platforms/android-23/android.jar"
nowarn="true"
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
<compilerclasspath path="/Applications/Processing.app/Contents/Java/modes/java/mode/org.eclipse.jdt.core.jar;/Applications/Processing.app/Contents/Java/modes/java/mode/jdtCompilerAdapter.jar" />
</javac>
</target>
<target name="dist" depends="build" description="Creates distribution package">
<mkdir dir="dist/tmp/cassette" />
<!-- copy library files (jar and gstreamer natives) -->
<copy todir="dist/tmp/cassette/library">
<fileset dir="library" />
</copy>
<!-- copy examples -->
<copy todir="dist/tmp/cassette/examples">
<fileset dir="examples" />
</copy>
<!-- copy source -->
<copy todir="dist/tmp/cassette/src">
<fileset dir="src" />
</copy>
<!-- copy properties -->
<copy file="library.properties" tofile="dist/tmp/cassette/library.properties" />
<!-- create the java reference of the library -->
<mkdir dir="reference" />
<javadoc bottom="Cassette"
classpath="/Applications/Processing.app/Contents/Java/core/library;bin"
destdir="reference"
verbose="false"
stylesheetfile="resources/stylesheet.css"
doctitle="Javadocs: Cassette"
public="true" version="false"
windowtitle="Javadocs: Cassette">
<link href="http://java.sun.com/javase/6/docs/api/" />
<link href="https://github.com/shlomihod/cassette" />
<taglet name="ExampleTaglet" path="examples" />
<fileset dir="src" defaultexcludes="yes">
<include name="**/*"/>
</fileset>
</javadoc>
<copy todir="dist/tmp/cassette/reference">
<fileset dir="reference" />
</copy>
<!-- create zip package -->
<delete file="dist/cassette.zip"/>
<zip destfile="dist/cassette.zip"
basedir="dist/tmp"
excludes="**/.DS_Store"
/>
<!-- copy properties to use by download manager -->
<copy file="library.properties" tofile="dist/cassette.txt" />
<delete dir="dist/tmp" />
</target>
</project>