forked from loopj/android-smart-image-view
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
49 lines (42 loc) · 1.73 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
<project default="package">
<!-- Project properties -->
<property name="version.num" value="1.0.0" />
<property name="project" value="android-smart-image-view" />
<property environment="env"/>
<!-- Standard jar stuff -->
<property name="jarfile" value="${project}-${version.num}.jar" />
<property name="lib.dir" value="${env.ANDROID_HOME}/platforms/android-7/" />
<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>
<!-- Compile java files into classes -->
<target name="compile">
<mkdir dir="${build.dir}" />
<mkdir dir="${classes.dir}" />
<javac srcdir="." destdir="${classes.dir}" classpathref="classpath" />
</target>
<!-- Package a jar from compiled class files -->
<target name="jar" depends="compile">
<delete file="${jarfile}" />
<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>