-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
66 lines (52 loc) · 2.42 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
<?xml version="1.0" encoding="utf-8" ?>
<project name="referencecards" default="pdf" basedir=".">
<property name="build.dir" value="build"/>
<property name="target.version" value="0.0.4"/>
<tstamp><format property="build.number" pattern="yyyyMMddHHmmss" timezone="GMT"/></tstamp>
<target name="version-for-snapshot" unless="version.label">
<property name="version.label" value="${target.version}-SNAPSHOT-${build.number}"/>
</target>
<target name="version-for-release" unless="version.label">
<property name="version.label" value="${target.version}"/>
</target>
<target name="version" depends="version-for-snapshot">
<echo message="Building version ${version.label}"/>
</target>
<target name="clean" description="Clean this project">
<delete dir="${build.dir}" failonerror="true" />
</target>
<target name="prepare">
<mkdir dir="${build.dir}"/>
</target>
<macrodef name="platypus">
<attribute name="srcfile"/>
<attribute name="destfile"/>
<sequential>
<fail message="Platypus was not prepared" unless="platypus.dir"/>
<echo message="Building @{destfile}"/>
<java jar="${platypus.dir}/platypus.jar" fork="true" failonerror="true" maxmemory="256m">
<env key="PLATYPUS_HOME" value="${platypus.dir}"/>
<arg value="@{srcfile}"/>
<arg value="@{destfile}"/>
<classpath refid="platypus.path"/>
</java>
</sequential>
</macrodef>
<target name="prepare-platypus" depends="prepare">
<property name="platypus.dir" value="${build.dir}/platypus"/>
<mkdir dir="${platypus.dir}"/>
<unzip dest="${platypus.dir}">
<fileset dir="buildlib">
<include name="platypus-*.zip"/>
</fileset>
</unzip>
<path id="platypus.path">
<fileset dir="${platypus.dir}" includes="platypus.jar"/>
</path>
<platypus srcfile="-fontlist" destfile=""/>
</target>
<target name="pdf" description="Create PDFs" depends="prepare,prepare-platypus,version">
<platypus srcfile="guava.platypus" destfile="${build.dir}/guava-ref-${version.label}.pdf"/>
</target>
<target name="release" description="Create release PDFs" depends="clean,version-for-release,pdf"/>
</project>