forked from processing/processing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
74 lines (66 loc) · 2.72 KB
/
build.xml
File metadata and controls
74 lines (66 loc) · 2.72 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
<?xml version="1.0"?>
<project name="Processing Hardware I/O Library" default="build">
<target name="clean" description="Clean the build directories">
<delete dir="bin" />
<delete file="library/io.jar" />
</target>
<target name="compile" description="Compile sources">
<condition property="core-built">
<available file="../../../core/library/core.jar" />
</condition>
<fail unless="core-built" message="Please build the core library first and make sure it sits in ../../../core/library/core.jar" />
<mkdir dir="bin" />
<javac source="1.8"
target="1.8"
srcdir="src" destdir="bin"
encoding="UTF-8"
includeAntRuntime="false"
classpath="../../../core/library/core.jar"
nowarn="true"
compiler="org.eclipse.jdt.core.JDTCompilerAdapter">
<compilerclasspath path="../../mode/org.eclipse.jdt.core.jar;
../../mode/jdtCompilerAdapter.jar" />
</javac>
</target>
<target name="build" depends="compile" description="Build I/O library">
<jar basedir="bin" destfile="library/io.jar" />
</target>
<target name="dist" depends="build" description="Package standalone library">
<!-- set revision number as library version -->
<loadfile srcfile="../../../todo.txt" property="revision">
<filterchain>
<headfilter lines="1"/>
<tokenfilter>
<stringtokenizer suppressdelims="true"/>
<!-- grab the thing from the first line that's 4 digits -->
<containsregex pattern="(\d\d\d\d)" />
</tokenfilter>
</filterchain>
</loadfile>
<replaceregexp file="library.properties" match="version = .*" replace="version = ${revision}" flags="g" />
<replaceregexp file="library.properties" match="prettyVersion = .*" replace="prettyVersion = ${revision}" flags="g" />
<get src="http://download.processing.org/reference.zip"
dest="reference.zip"
usetimestamp="true" />
<mkdir dir="reference" />
<unzip dest="."
src="reference.zip"
overwrite="true">
<patternset>
<include name="reference/css/**" />
<include name="reference/img/**" />
<include name="reference/javascript/**" />
<include name="reference/libraries/io/**" />
</patternset>
</unzip>
<delete file="reference.zip" />
<echo file="reference/index.html" message="<html><head><meta http-equiv='refresh' content='0; url=libraries/io/index.html'></head><body></body></html>" />
<zip destfile="../io.zip">
<zipfileset dir="." prefix="io">
<exclude name="bin/**"/>
</zipfileset>
</zip>
<copy file="library.properties"
toFile="../io.txt"/>
</target>
</project>