-
Notifications
You must be signed in to change notification settings - Fork 53
/
custom_rules.xml
94 lines (86 loc) · 3.38 KB
/
custom_rules.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" encoding="utf-8"?>
<!--
*
* Funf: Open Sensing Framework
* Copyright (C) 2010-2011 Nadav Aharony, Wei Pan, Alex Pentland.
* Acknowledgments: Alan Gardner
* Contact: [email protected]
*
* This file is part of Funf.
*
* Funf is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
* Funf is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Funf. If not, see <http://www.gnu.org/licenses/>.
*
-->
<project name="funf" default="help">
<property name="src.dir" location="src" />
<property name="docs.dir" location="bin/docs" />
<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
<delete dir="${docs.dir}" />
</target>
<!-- Creates the build, docs and dist directory-->
<target name="makedir">
<mkdir dir="${docs.dir}" />
</target>
<!-- Creates Javadoc -->
<target name="docs">
<javadoc packagenames="src" sourcepath="${src.dir}" destdir="${docs.dir}">
<!-- Define which files / directory should get included, we include all -->
<fileset dir="${src.dir}">
<include name="**" />
<!-- TODO: add excludes or includes to filter external libraries -->
</fileset>
</javadoc>
</target>
<target name="getgitdetails" >
<exec executable="git" outputproperty="git.tagstring">
<arg value="describe"/>
</exec>
<exec executable="git" outputproperty="git.revision">
<arg value="rev-parse"/>
<arg value="HEAD"/>
</exec>
<condition property="git.tag" value="dev" else="${git.tagstring}">
<contains string="${git.tagstring}" substring="fatal"/>
</condition>
</target>
<target name="jar" depends="-compile,getgitdetails">
<delete file="bin/funf.jar"/>
<mkdir dir="bin" />
<tstamp>
<format property="now" pattern="yyyy-MM-dd HH:mm:ss" />
</tstamp>
<manifest file="bin/MANIFEST.MF">
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Implementation-Title" value="Funf"/>
<attribute name="Implementation-Version" value="${git.tag}r${git.revision}"/>
<attribute name="Implementation-Vendor" value="Funf at MIT Media Lab"/>
<attribute name="Built-Date" value="${now}"/>
</manifest>
<jar destfile="bin/funf.jar"
basedir="bin/classes"
includes="**/*.class"
manifest="bin/MANIFEST.MF" />
</target>
<target name="jardebug" depends="jar">
</target>
<target name="jarrelease" depends="jar">
<input message="Please enter keystore password:" addproperty="keypass" />
<signjar jar="bin/funf.jar"
keystore="${keystore}"
alias="${keystore.alias}"
storepass="${keypass}"
signedjar="bin/funf-${git.tag}.jar"></signjar>
</target>
</project>