-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
70 lines (67 loc) · 3.77 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2012-2017 Anar Software LLC <http://anars.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<project name="jBraces" default="build" basedir=".">
<description>
jBraces Ant Build File
</description>
<property file="build.properties"/>
<property name="source.dir" location="source"/>
<property name="classes.dir" location="classes"/>
<property name="release.dir" location="release"/>
<target name="build" description="compile the source code">
<tstamp>
<format property="build.number" pattern="yyyyMMdd"/>
</tstamp>
<replaceregexp file="${source.dir}/com/anars/jbraces/TemplateProcessor.java" flags="g"
match='public static final double APPLICATION_VERSION = (.*);'
replace='public static final double APPLICATION_VERSION = ${version.number};'/>
<replaceregexp file="${source.dir}/com/anars/jbraces/TemplateProcessor.java" flags="g"
match='public static final long APPLICATION_BUILD = (.*);'
replace='public static final long APPLICATION_BUILD = ${build.number};'/>
<mkdir dir="${classes.dir}"/>
<javac includeantruntime="false" srcdir="${source.dir}" destdir="${classes.dir}" source="1.5" target="1.5">
<exclude name="${source.dir}/com/anars/jbraces/samples/*"/>
<exclude name="${source.dir}/com/anars/jbraces/ApplyToFileSample.java"/>
<exclude name="${source.dir}/com/anars/jbraces/RunAllSamples.java"/>
</javac>
<mkdir dir="${release.dir}"/>
<jar jarfile="${release.dir}/jBraces-r${build.number}.jar" basedir="${classes.dir}" level="9">
<manifest>
<attribute name="Created-By" value="Anar Software LLC"/>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Implementation-Vendor" value="Anar Software LLC"/>
<attribute name="Implementation-URL" value="http://anars.com"/>
</manifest>
</jar>
<checksum file="${release.dir}/jBraces-r${build.number}.jar" forceoverwrite="yes"/>
<move verbose="true" todir="${release.dir}">
<fileset dir="${release.dir}">
<include name="**MD5"/>
</fileset>
<mapper type="regexp" from="(.*)jar.MD5" to="\1md5"/>
</move>
<copy file="jBraces.license" tofile="${release.dir}/jBraces-r${build.number}.license"/>
<copy file="${release.dir}/jBraces-r${build.number}.jar" tofile="${release.dir}/jBraces-${version.number}.jar"/>
<copy file="${release.dir}/jBraces-r${build.number}.md5" tofile="${release.dir}/jBraces-${version.number}.md5"/>
<copy file="${release.dir}/jBraces-r${build.number}.license"
tofile="${release.dir}/jBraces-${version.number}.license"/>
<delete dir="${classes.dir}"/>
</target>
</project>