-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-android.xml
81 lines (77 loc) · 3.24 KB
/
build-android.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
<project name="WagErg Android" default="android.all">
<!-- LOCAL TOOLCHAIN AND CODE_SIGNING PROPERTIES -->
<property file="local.properties"/>
<!-- COMMON BUILD PROPERTIES -->
<property file="build.properties" />
<!-- PLATFORM PROPERTIES -->
<property name="android.build.dir" value="${project.bin}/android"/>
<property name="android.device.apk.path" value="${android.build.dir}/WagErg.apk"/>
<property name="android.emulator.apk.path" value="${android.build.dir}/WagErg-emulator.apk"/>
<property name="android.swf" value="bin/WagErg.swf"/>
<property name="android.main.source" value="src/WagErgAndroidPhone.as"/>
<property name="android.package.name" value="com.starpause.wagerg"/> <!-- must match id in app.xml -->
<target name="android.all" depends="android.compile,android.deploy,android.launch"/>
<target name="android.compile">
<java jar="${mxmlc.jar}" fork="true" failonerror="true">
<arg value="-debug=false" />
<arg value="-optimize=true" />
<arg value="+flexlib=${flex.sdk.home}/frameworks" />
<arg value="+configname=air" />
<arg value="-file-specs=${android.main.source}" />
<arg value="-output=${android.swf}" />
<arg value="-l+=${lib.dir}" />
</java>
</target>
<target name="android.deploy" depends="android.package.device,android.undeploy">
<java jar="${adt.jar}" fork="true" failonerror="true">
<arg line="-installApp" />
<arg line="-platform android"/>
<arg line="-platformsdk ${android.sdk.home}"/>
<arg line="-package ${android.device.apk.path}" />
</java>
</target>
<target name="android.package.device">
<mkdir dir="${android.build.dir}"/>
<java jar="${adt.jar}" fork="true" failonerror="true">
<arg line="-package" />
<arg line="-target apk" />
<arg line="-storetype pkcs12"/>
<arg line="-keystore ${android.keystore.path}" />
<arg line="-storepass ${android.keystore.pass}"/>
<arg line="${android.device.apk.path}" />
<arg line="${basedir}/config/WagErg-app.xml" />
<arg line="${android.swf}" />
<arg line="src/assets/android/icons/"/>
</java>
</target>
<target name="android.package.emulator">
<mkdir dir="${android.build.dir}"/>
<java jar="${adt.jar}" fork="true" failonerror="true">
<arg line="-package" />
<arg line="-target apk-emulator" />
<arg line="-storetype pkcs12"/>
<arg line="-keystore ${android.keystore.path}" />
<arg line="-storepass ${android.keystore.pass}"/>
<arg line="${android.emulator.apk.path}" />
<arg line="${basedir}/config/WagErg-app.xml" />
<arg line="${android.swf}" />
<arg line="src/assets/android/icons/"/>
</java>
</target>
<target name="android.undeploy">
<java jar="${adt.jar}" fork="true" failonerror="false">
<arg line="-uninstallApp" />
<arg line="-platform android" />
<arg line="-platformsdk ${android.sdk.home}"/>
<arg line="-appid ${android.package.name}" />
</java>
</target>
<target name="android.launch">
<java jar="${adt.jar}" fork="true" failonerror="true">
<arg line="-launchApp" />
<arg line="-platform android" />
<arg line="-platformsdk ${android.sdk.home}"/>
<arg line="-appid ${android.package.name}" />
</java>
</target>
</project>