|
@ -68,10 +68,10 @@
|
68
|
68
|
-I ${android-jar} -S ${project_home}/${res-dir}"/>
|
69
|
69
|
<for list="${libraries}" param="library">
|
70
|
70
|
<sequential>
|
71
|
|
<available property="isExist_library_res" file="@{library}/res" type="dir" />
|
|
71
|
<available property="isExist_library_res_r" file="@{library}/res" type="dir" />
|
72
|
72
|
|
73
|
73
|
<if>
|
74
|
|
<equals arg1="${isExist_library_res}" arg2="true" />
|
|
74
|
<equals arg1="${isExist_library_res_r}" arg2="true" />
|
75
|
75
|
<then>
|
76
|
76
|
<var name="p" value="${p} -S @{library}/${res-dir}"/>
|
77
|
77
|
</then>
|
|
@ -88,10 +88,10 @@
|
88
|
88
|
|
89
|
89
|
<target name="aapt_gererateR_library">
|
90
|
90
|
<echo>gererate R.java with ${library}</echo>
|
91
|
|
<available property="isExist_library_res" file="${library}/res" type="dir" />
|
|
91
|
<available property="isExist_library_r_l" file="${library}/res" type="dir" />
|
92
|
92
|
<!-- 是否需要参数 -S ${library}/${res-dir} -->
|
93
|
93
|
<if>
|
94
|
|
<equals arg1="${isExist_library_res}" arg2="true" />
|
|
94
|
<equals arg1="${isExist_library_r_l}" arg2="true" />
|
95
|
95
|
<then>
|
96
|
96
|
<var name="param" value="-S ${library}/${res-dir}"/>
|
97
|
97
|
</then>
|
|
@ -127,10 +127,10 @@
|
127
|
127
|
<!-- 编译java文件为class文件 -->
|
128
|
128
|
<target name="compile">
|
129
|
129
|
|
130
|
|
<available property="isExist_host_libs" file="${host-libs}" type="dir" />
|
|
130
|
<available property="isExist_host_libs_h" file="${host-libs}" type="dir" />
|
131
|
131
|
|
132
|
132
|
<if>
|
133
|
|
<equals arg1="${isExist_host_libs}" arg2="true" />
|
|
133
|
<equals arg1="${isExist_host_libs_h}" arg2="true" />
|
134
|
134
|
<then>
|
135
|
135
|
<copydir src="${host-libs}"
|
136
|
136
|
dest="${host-bin}/libs"/>
|
|
@ -138,10 +138,10 @@
|
138
|
138
|
</if>
|
139
|
139
|
<for list="${libraries}" param="library">
|
140
|
140
|
<sequential>
|
141
|
|
<available property="isExist_library_libs" file="@{library}/libs" type="dir" />
|
|
141
|
<available property="isExist_library_libs_l" file="@{library}/libs" type="dir" />
|
142
|
142
|
|
143
|
143
|
<if>
|
144
|
|
<equals arg1="${isExist_library_libs}" arg2="true" />
|
|
144
|
<equals arg1="${isExist_library_libs_l}" arg2="true" />
|
145
|
145
|
<then>
|
146
|
146
|
<copydir src="@{library}/libs"
|
147
|
147
|
dest="${host-bin}/libs"
|
|
@ -200,10 +200,10 @@
|
200
|
200
|
<echo>Packaging dex...</echo>
|
201
|
201
|
<var name="dex_p" value="--dex --output=${intermediate-dex} ${host-classes}"/>
|
202
|
202
|
|
203
|
|
<available property="isExist_host_libs" file="${host-libs}" type="dir" />
|
|
203
|
<available property="isExist_host_libs_dx" file="${host-libs}" type="dir" />
|
204
|
204
|
|
205
|
205
|
<if>
|
206
|
|
<equals arg1="${isExist_host_libs}" arg2="true" />
|
|
206
|
<equals arg1="${isExist_host_libs_dx}" arg2="true" />
|
207
|
207
|
<then>
|
208
|
208
|
<var name="dex_p" value="${dex_p} ${host-libs}"/>
|
209
|
209
|
</then>
|
|
@ -211,10 +211,10 @@
|
211
|
211
|
|
212
|
212
|
<for list="${libraries}" param="library">
|
213
|
213
|
<sequential>
|
214
|
|
<available property="isExist_library_libs" file="@{library}/libs" type="dir" />
|
|
214
|
<available property="isExist_host_libs_dx_l" file="@{library}/libs" type="dir" />
|
215
|
215
|
|
216
|
216
|
<if>
|
217
|
|
<equals arg1="${isExist_library_libs}" arg2="true" />
|
|
217
|
<equals arg1="${isExist_host_libs_dx_l}" arg2="true" />
|
218
|
218
|
<then>
|
219
|
219
|
<var name="dex_p" value="${dex_p} @{library}/libs"/>
|
220
|
220
|
</then>
|
|
@ -236,10 +236,10 @@
|
236
|
236
|
<var name="temp" value=""/>
|
237
|
237
|
<for list="${libraries}" param="library">
|
238
|
238
|
<sequential>
|
239
|
|
<available property="isExist_library_res" file="@{library}/res" type="dir" />
|
|
239
|
<available property="isExist_library_res_aapt" file="@{library}/res" type="dir" />
|
240
|
240
|
|
241
|
241
|
<if>
|
242
|
|
<equals arg1="${isExist_library_res}" arg2="true" />
|
|
242
|
<equals arg1="${isExist_library_res_aapt}" arg2="true" />
|
243
|
243
|
<then>
|
244
|
244
|
<var name="temp" value="${temp} -S @{library}/${res-dir}"/>
|
245
|
245
|
</then>
|
|
@ -248,6 +248,9 @@
|
248
|
248
|
</sequential>
|
249
|
249
|
</for>
|
250
|
250
|
|
|
251
|
<echo>------------------------------</echo>
|
|
252
|
<echo>${temp}</echo>
|
|
253
|
|
251
|
254
|
<var name="res_p" value="package -f -M ${project_home}/${manifest-xml} -S ${project_home}/${res-dir} ${temp} -A ${project_home}/${asset-dir} -I ${android-jar} -F ${resources-package} --auto-add-overlay"/>
|
252
|
255
|
|
253
|
256
|
<exec executable="${aapt}" failonerror="true">
|
|
@ -263,17 +266,16 @@
|
263
|
266
|
<var name="temp" value=""/>
|
264
|
267
|
<for list="${libraries}" param="library">
|
265
|
268
|
<sequential>
|
266
|
|
<available property="isExist_library_libs" file="@{library}/libs" type="dir" />
|
|
269
|
<available property="isExist_library_libs_builder" file="@{library}/libs" type="dir" />
|
267
|
270
|
|
268
|
271
|
<if>
|
269
|
|
<equals arg1="${isExist_library_libs}" arg2="true" />
|
|
272
|
<equals arg1="${isExist_library_libs_builder}" arg2="true" />
|
270
|
273
|
<then>
|
271
|
274
|
<var name="temp" value="${temp} -nf @{library}/libs -rj @{library}/libs"/>
|
272
|
275
|
</then>
|
273
|
276
|
</if>
|
274
|
277
|
</sequential>
|
275
|
278
|
</for>
|
276
|
|
|
277
|
279
|
<var name="apkBuild_p" value="${out-unsigned-package} -u -z ${resources-package} -f ${intermediate-dex} -rf ${host-src} ${temp}"/>
|
278
|
280
|
|
279
|
281
|
<java classpath="${android_apk_tools}/lib/sdklib.jar" classname="com.android.sdklib.build.ApkBuilderMain" fork="true" failonerror="true">
|