-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.xml
77 lines (69 loc) · 2.68 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
<project name="socialite" default="compile" basedir=".">
<property name="src" value="${basedir}/src" />
<property name="gen" value="${basedir}/gen/" />
<property name="classes" value="${basedir}/classes" />
<property name="distdir" value="${basedir}/dist" />
<property name="lib" value="${basedir}/ext/" />
<property name="debug" value="Yes" />
<path id="classpath">
<pathelement location="${classes}"/>
<fileset dir="${lib}">
<include name="**/*.jar"/>
<include name="**/**/*.jar"/>
</fileset>
</path>
<target name="clean" depends="init">
<delete>
<fileset dir="${classes}/">
<include name="**/*.class"/>
<include name="**/*.jar"/>
<include name="**/*.stg"/>
<exclude name="**/*.sh"/>
</fileset>
</delete>
</target>
<target name="init">
<mkdir dir="${classes}"/>
</target>
<target name="compile" depends="init">
<javac includeantruntime="false" srcdir="${src}/java" destdir="${classes}" debug="${debug}">
<compilerarg value="-XDignore.symbol.file"/>
<classpath refid="classpath"/>
</javac>
<copy todir="${classes}">
<fileset dir="${src}/java" excludes="**/*.java"/>
</copy>
<jar jarfile="${classes}/socialite.jar">
<fileset dir="${classes}">
<include name="**/*.class"/>
<include name="**/*.stg"/>
<exclude name="**/*.jar"/>
</fileset>
</jar>
</target>
<target name="gen-compile" depends="init">
<javac includeantruntime="false" srcdir="${gen}/socialite/classes/" destdir="${classes}" debug="${debug}">
<compilerarg value="-XDignore.symbol.file"/>
<classpath refid="classpath"/>
</javac>
<copy todir="${classes}">
<fileset dir="${src}/java" excludes="**/*.java"/>
</copy>
</target>
<target name="build-thrift" depends="init">
<apply executable="thrift">
<arg line="-r --gen java -I ${src}/thrift/ -out ${src}/java/"/>
<fileset dir="${src}/thrift/" includes="**/*.thrift"/>
</apply>
<apply executable="thrift">
<arg line="-r --gen py -I ${src}/thrift/ -out ${src}/python/"/>
<fileset dir="${src}/thrift/" includes="**/*.thrift"/>
</apply>
</target>
<target name="alljar" depends="compile">
<jar destfile="${basedir}/socialite-all.jar">
<zipgroupfileset dir="${basedir}/ext" includes="*.jar"/>
<zipgroupfileset dir="${classes}/" includes="*.jar"/>
</jar>
</target>
</project>