forked from android-async-http/android-async-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
71 lines (61 loc) · 2.37 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
<project default="package">
<property file="local.properties"/>
<property file="default.properties"/>
<!-- Package properties -->
<property name="package.name" value="android-async-http" />
<property name="package.version" value="1.3.1" />
<property name="package.packagename" value="com.loopj.android.http" />
<!-- Standard jar stuff -->
<property name="jarfile" value="${package.name}-${package.version}.jar" />
<property name="lib.dir" value="${sdk.dir}platforms/${target}" />
<property name="build.dir" value="./build"/>
<property name="classes.dir" value="${build.dir}/classes"/>
<buildnumber file="build.num" />
<!-- Set up classpath -->
<path id="classpath">
<fileset dir="${lib.dir}" includes="**/*.jar" />
</path>
<!-- Build javadoc -->
<target name="doc">
<javadoc
classpathref="classpath"
sourcepath="gen:src"
destdir="doc"
packagenames="${package.packagename}"
linkoffline="http://d.android.com/reference ${sdk.dir}docs/reference"
additionalparam="-author -version"
/>
</target>
<!-- Compile java files into classes -->
<target name="compile">
<mkdir dir="${build.dir}" />
<mkdir dir="${classes.dir}" />
<javac
srcdir="."
destdir="${classes.dir}"
classpathref="classpath"
debug="true"
debuglevel="lines,source" />
</target>
<!-- Package a jar from compiled class files -->
<target name="jar" depends="compile">
<delete dir="." includes="**/*.jar" />
<delete file="MANIFEST.MF" />
<manifest file="MANIFEST.MF">
<attribute name="Built-By" value="${user.name}" />
<attribute name="Implementation-Version" value="${version.num}-b${build.number}"/>
</manifest>
<jar destfile="${jarfile}" basedir="build/classes" includes="com/loopj/android/http/**/*.class" manifest="MANIFEST.MF" />
</target>
<!-- Clean out the build files -->
<target name="clean">
<delete dir="build" />
<delete dir="doc" />
<delete>
<fileset dir="." includes="*.jar"/>
<fileset file="MANIFEST.MF"/>
</delete>
</target>
<!-- Compile and package a jar -->
<target name="package" depends="compile,jar" />
</project>