forked from simonguest/android-btxfr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
197 lines (159 loc) · 7.87 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?xml version="1.0" encoding="UTF-8"?>
<project name="android-btxfer" default="all">
<property file="build.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/.bundle/**"/>
<exclude name="**/*.rbc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.apk"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.ane"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.android_4.2_platform" value="${jdk.home.android_4.2_platform}/../../System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin"/>
<path id="jdk.classpath.android_4.2_platform">
<fileset dir="${jdk.home.android_4.2_platform}">
<include name="platforms/android-17/android.jar"/>
<include name="platforms/android-17/data/res"/>
<include name="tools/support/annotations.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.android_4.2_platform}"/>
<property name="project.jdk.bin" value="${jdk.bin.android_4.2_platform}"/>
<property name="project.jdk.classpath" value="jdk.classpath.android_4.2_platform"/>
<!-- Modules -->
<!-- Module android-btxfer -->
<dirname property="module.android-btxfer.basedir" file="${ant.file}"/>
<property name="module.jdk.home.android-btxfer" value="${jdk.home.android_4.2_platform}"/>
<property name="module.jdk.bin.android-btxfer" value="${jdk.bin.android_4.2_platform}"/>
<property name="module.jdk.classpath.android-btxfer" value="jdk.classpath.android_4.2_platform"/>
<property name="compiler.args.android-btxfer" value="${compiler.args}"/>
<property name="android-btxfer.output.dir" value="${module.android-btxfer.basedir}/out/production/android-btxfer"/>
<property name="android-btxfer.testoutput.dir" value="${module.android-btxfer.basedir}/out/test/android-btxfer"/>
<path id="android-btxfer.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="android-btxfer.module.production.classpath">
<path refid="${module.jdk.classpath.android-btxfer}"/>
</path>
<path id="android-btxfer.runtime.production.module.classpath">
<pathelement location="${android-btxfer.output.dir}"/>
</path>
<path id="android-btxfer.module.classpath">
<path refid="${module.jdk.classpath.android-btxfer}"/>
<pathelement location="${android-btxfer.output.dir}"/>
</path>
<path id="android-btxfer.runtime.module.classpath">
<pathelement location="${android-btxfer.testoutput.dir}"/>
<pathelement location="${android-btxfer.output.dir}"/>
</path>
<patternset id="excluded.from.module.android-btxfer">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.android-btxfer">
<patternset refid="excluded.from.module.android-btxfer"/>
</patternset>
<path id="android-btxfer.module.sourcepath">
<dirset dir="${module.android-btxfer.basedir}">
<include name="gen"/>
<include name="src"/>
</dirset>
</path>
<target name="compile.module.android-btxfer" depends="compile.module.android-btxfer.production,compile.module.android-btxfer.tests" description="Compile module android-btxfer"/>
<target name="compile.module.android-btxfer.production" description="Compile module android-btxfer; production classes">
<mkdir dir="${android-btxfer.output.dir}"/>
<javac destdir="${android-btxfer.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.android-btxfer}/javac">
<compilerarg line="${compiler.args.android-btxfer}"/>
<bootclasspath refid="android-btxfer.module.bootclasspath"/>
<classpath refid="android-btxfer.module.production.classpath"/>
<src refid="android-btxfer.module.sourcepath"/>
<patternset refid="excluded.from.compilation.android-btxfer"/>
</javac>
<copy todir="${android-btxfer.output.dir}">
<fileset dir="${module.android-btxfer.basedir}/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.android-btxfer.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.android-btxfer.tests" depends="compile.module.android-btxfer.production" description="compile module android-btxfer; test classes" unless="skip.tests"/>
<target name="clean.module.android-btxfer" description="cleanup module">
<delete dir="${android-btxfer.output.dir}"/>
<delete dir="${android-btxfer.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.android-btxfer" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.android-btxfer" description="build all modules"/>
<target name="init.artifacts">
<property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
<property name="artifact.output.android-btxfr" value="${basedir}/out/artifacts/android_btxfr"/>
<mkdir dir="${artifacts.temp.dir}"/>
<property name="temp.jar.path.android-btxfr.jar" value="${artifacts.temp.dir}/android-btxfr.jar"/>
</target>
<target name="artifact.android-btxfr" depends="init.artifacts, compile.module.android-btxfer" description="Build 'android-btxfr' artifact">
<property name="artifact.temp.output.android-btxfr" value="${artifacts.temp.dir}/android_btxfr"/>
<mkdir dir="${artifact.temp.output.android-btxfr}"/>
<jar destfile="${temp.jar.path.android-btxfr.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain">
<zipfileset file="${basedir}/META-INF/MANIFEST.MF" prefix="META-INF"/>
<zipfileset dir="${android-btxfer.output.dir}"/>
</jar>
<copy file="${temp.jar.path.android-btxfr.jar}" tofile="${artifact.temp.output.android-btxfr}/android-btxfr.jar"/>
</target>
<target name="build.all.artifacts" depends="artifact.android-btxfr" description="Build all artifacts">
<mkdir dir="${artifact.output.android-btxfr}"/>
<copy todir="${artifact.output.android-btxfr}">
<fileset dir="${artifact.temp.output.android-btxfr}"/>
</copy>
<!-- Delete temporary files -->
<delete dir="${artifacts.temp.dir}"/>
</target>
<target name="all" depends="build.modules, build.all.artifacts" description="build all"/>
</project>