This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
142 lines (121 loc) · 5.59 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<project default="compile" basedir="." name="ZRTP4J">
<target name="init">
<property name="distname" value="ZRTP4J"/>
<property name='product.Name' value='GNU ZRTP implementation for Java'/>
<property name='product.name' value='ZRTP4J'/>
<property name='product.shortname' value='zrtp4j'/>
<property name='product.version.major' value='4'/>
<property name='product.version.minor' value='1'/>
<property name='product.version.level' value='0'/>
<property name='product.Version' value='${product.version.major}.${product.version.minor}'/>
<property name='product.version' value='${product.version.major}.${product.version.minor}.${product.version.level}'/>
<property name='product_version' value='${product.version.major}_${product.version.minor}_${product.version.level}'/>
<property name="year" value="2009"/>
<property name="copyright" value="Copyright © ${year} Werner Dittmann. All Rights Reserved."/>
<!-- set global properties for this build -->
<property name="common-src" value="src"/>
<property name="common-tests" value="test"/>
<property name="common-build.classes" value="classes"/>
<property name="dir.dist" value="./dist"/>
<property name="dir.libs" value="./lib"/>
<property name="build.doc" value="doc"/>
<property name="zrtp4j-jar.name" value="${product.shortname}-${product.version}.jar"/>
<property name="zrtp4j-zip.name" value="${product.shortname}-${product.version}.zip"/>
<property name="zrtp4j-full-jar.name" value="${product.shortname}-full-${product.version}.jar"/>
<property name="zrtp4j-src-zip.name" value="${product.shortname}-src-${product.version}.zip" />
<property name="jmf" value="jmf.jar" />
<property name="bc" value="bcprov-jdk15on-1.64.jar" />
<property name="bccontrib" value="bccontrib-1.0-SNAPSHOT.jar" />
<property name="junit" value="junit-3.8.1.jar" />
<!-- set the path ids to use in the compile targets. To compile
we need some 3rd party libs.
-->
<path id="common.libraries" description="required libs to compile the sources">
<fileset dir="${dir.libs}">
<include name="${jmf}"/>
<include name="${bc}"/>
<include name="${bccontrib}"/>
<include name="${junit}"/>
</fileset>
</path>
<!-- No tests yet
<path id="test.libraries" description="path setup for tests">
<fileset dir="${dir.dist}">
<include name="**/${zrtp4j-jar.name}"/>
</fileset>
<fileset dir="${dir.libs}">
<include name="log4j-1.2.9.jar" />
<include name="commons-logging-1.0.4.jar" />
<include name="${jmf}"/>
<include name="${bc}"/>
</fileset>
<pathelement path="${common-build.classes}"/>
</path>
-->
</target> <!-- end of target "init" -->
<target name="jar" depends="compile"
description="Create the jar files for ZRTP4J" >
<jar destfile="${dir.dist}/${zrtp4j-full-jar.name}" >
<fileset dir="${common-build.classes}" >
<include name="gnu/java/**" />
<include name="org/bouncycastle/**" />
<include name="djb/**" />
<exclude name="gnu/java/bigintcrypto/test/**" />
</fileset>
</jar>
<jar destfile="${dir.dist}/${zrtp4j-jar.name}" >
<fileset dir="${common-build.classes}" >
<include name="gnu/java/**" />
<include name="org/bouncycastle/**" />
<include name="djb/**" />
<exclude name="gnu/java/bigintcrypto/test/**" />
<exclude name="gnu/java/zrtp/jmf/**" />
</fileset>
</jar>
<copy tofile="${dir.dist}/zrtp4j-light.jar" file="${dir.dist}/${zrtp4j-jar.name}" />
</target>
<target name="bindist" depends="jar" description="Build zip file for ZRTP4J distribution">
<zip destfile="${dir.dist}/${zrtp4j-zip.name}">
<zipfileset prefix="zrtp4j" dir="." includes="README.txt, doc/**, legal/**" />
<zipfileset fullpath="zrtp4j/${zrtp4j-full-jar.name}" dir="${dir.dist}" includes="${zrtp4j-full-jar.name}"/>
<zipfileset fullpath="zrtp4j/${zrtp4j-jar.name}" dir="${dir.dist}" includes="${zrtp4j-jar.name}"/>
</zip>
</target>
<target name="srcdist" depends="init" description="Build source zip file for ZRTP4J distribution">
<zip destfile="${dir.dist}/${zrtp4j-src-zip.name}">
<zipfileset prefix="zrtp4j" dir="." includes="src/** LICENSE.txt README.txt NOTICE legal/** build.xml "/>
</zip>
</target>
<!-- Prepare directory structure for project build-->
<target name="prepare" depends="init">
<mkdir dir="${common-build.classes}"/>
<mkdir dir="${dir.dist}"/>
</target>
<!-- Compile classes and store them to ${*-build.classes} -->
<target name="compile" depends="prepare">
<javac source="1.7" target="1.7" srcdir="${common-src}" destdir="${common-build.classes}" debug="on">
<classpath refid="common.libraries"/>
</javac>
</target>
<!-- Delete the ${build} and ${dist} directory trees -->
<target name="clean" depends="init, clean-build, clean-dist"/>
<target name="clean-build">
<delete dir="${common-build.classes}"/>
</target>
<target name="clean-dist">
<delete dir="${dir.dist}"/>
</target>
<!-- no tests yet
<target name="test" depends="compile">
<junit printsummary="yes" fork="yes" haltonfailure="yes" haltonerror="yes" dir="${basedir}">
<classpath refid="test.libraries" />
<formatter type="plain" />
<batchtest>
<fileset dir="${common-build.classes}">
<include name="**/demo/PackageTests.class"/>
</fileset>
</batchtest>
</junit>
</target>
-->
</project>