forked from cameronr/airbrake-android
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
executable file
·56 lines (48 loc) · 1.91 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
<project default="package">
<property environment="env"/>
<!-- Project properties -->
<property name="version.num" value="1.3.0" />
<property name="project" value="airbrake-android" />
<!-- Standard jar stuff -->
<property name="build.dir" value="./build"/>
<property name="jarfile" value="${build.dir}/${project}-${version.num}.jar" />
<property name="env.ANDROID_HOME" value="/usr/local/android_sdk"/>
<property name="lib.dir" value="${env.ANDROID_HOME}/platforms/android-7/" />
<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>
<!-- 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="**/*.class" manifest="MANIFEST.MF" />
</target>
<!-- Clean out the build files -->
<target name="clean">
<delete dir="build" />
<delete>
<fileset dir="." includes="${jarfile}"/>
<fileset file="MANIFEST.MF"/>
</delete>
</target>
<!-- Compile and package a jar -->
<target name="package" depends="compile,jar" />
</project>