-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
75 lines (62 loc) · 2.72 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
<project name="android-desktop-headless" default="package">
<property name="android.src" location="/home/stella/branches/android"/>
<property name="android.base.core" location="${android.src}/frameworks/base/core"/>
<property name="android.base.location" location="${android.src}/frameworks/base/location"/>
<property name="build.dir" location="build"/>
<property name="aidl.exe" location="/home/stella/android-sdk/platform-tools/aidl"/>
<!-- Patternsets -->
<patternset id="ps.core" includesfile="patterns/core.includes.txt" excludesfile="patterns/core.excludes.txt"/>
<patternset id="ps.location" includesfile="patterns/location.includes.txt" excludesfile="patterns/location.excludes.txt"/>
<target name="init">
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<target name="compile-core" depends="init">
<!-- Compile core -->
<mkdir dir="${build.dir}/src-core"/>
<mkdir dir="${build.dir}/classes-core"/>
<copy todir="${build.dir}/src-core">
<fileset dir="${android.base.core}/java">
<patternset refid="ps.core"/>
</fileset>
<fileset dir="${android.base.location}/java">
<patternset refid="ps.location"/>
</fileset>
</copy>
<apply executable="${aidl.exe}">
<arg value="-I./src-core"/>
<arg value="-I${build.dir}/src-core"/>
<fileset dir="${build.dir}/src-core">
<include name="**/*.aidl"/>
</fileset>
</apply>
<javac destdir="${build.dir}/classes-core" includeAntRuntime="false" target="1.5" source="1.5" debug="true" encoding="UTF-8">
<src path="src-core"/>
<src path="${build.dir}/src-core"/>
</javac>
</target>
<target name="compile-apache-http" depends="init">
<property name="http.dir" location="${android.src}/external/apache-http"/>
<mkdir dir="${build.dir}/classes-http"/>
<javac destdir="${build.dir}/classes-http" includeAntRuntime="false" target="1.5" source="1.5" debug="true" encoding="UTF-8">
<src path="${http.dir}"/>
</javac>
</target>
<target name="compile-libcore" depends="init">
<property name="libcore.dir" location="${android.src}/libcore"/>
<mkdir dir="${build.dir}/classes-libcore"/>
<javac destdir="${build.dir}/classes-libcore" includeAntRuntime="false" target="1.5" source="1.5" debug="true" encoding="UTF-8">
<src path="${libcore.dir}/json/src/main/java"/>
<src path="${libcore.dir}/xml/src/main/java"/>
<src path="${libcore.dir}/sqlite-jdbc/src/main/java"/>
</javac>
</target>
<target name="package" depends="clean,compile-libcore,compile-core,compile-apache-http">
<jar jarfile="${build.dir}/android-desktop-headless.jar">
<fileset dir="${build.dir}/classes-libcore"/>
<fileset dir="${build.dir}/classes-core"/>
<fileset dir="${build.dir}/classes-http"/>
</jar>
</target>
</project>