-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
131 lines (120 loc) · 4.61 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="HunkyPunk" default="hunkypunk-debug">
<property file="local.properties"/>
<property file="project.properties"/>
<property file="ant.properties"/>
<target name="hunkypunk-release" depends="clean, jnilibs, release" />
<target name="hunkypunk-debug" depends="jnilibs, debug" />
<!--
************************************************************************
* *
* Plugins *
* *
************************************************************************
-->
<target name="jnilibs">
<!--
todo: depends="javah"
-->
<exec executable="sh"
failonerror="true"
dir=".">
<arg value="${ndk.dir}/ndk-build"/>
</exec>
</target>
<!--
************************************************************************
* *
* Clean *
* *
************************************************************************
-->
<target name="clean-plugins">
<!--
todo: ...
-->
</target>
<target name="clean" depends="clean-plugins">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="bin" includes="**/*"/>
</delete>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="gen" includes="**/*"/>
</delete>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="libs/armeabi" includes="**/*"/>
</delete>
</target>
<!--
************************************************************************
* *
* Hunky Punk Mod builder *
* *
************************************************************************
-->
<target name="mod-debug" depends="mod-copy,mod-debug-override">
<ant inheritAll="false" dir="./alt-apk/mod" antfile="build.xml" target="hunkypunk-debug" />
<move file="./alt-apk/mod/bin/HunkyPunk-debug.apk" tofile="./alt-apk/mod/bin/HunkyPunkMod-debug.apk"/>
</target>
<target name="mod-release" depends="mod-copy,mod-release-override">
<ant inheritAll="false" dir="./alt-apk/mod" antfile="build.xml" target="hunkypunk-release" />
<move file="./alt-apk/mod/bin/HunkyPunk-release.apk" tofile="./alt-apk/mod/bin/HunkyMod-release.apk"/>
</target>
<target name="mod-copy">
<copy todir="./alt-apk/mod">
<fileset dir=".">
<exclude name="**/alt-apk/**" />
<exclude name="**/bin/**" />
<exclude name="**/obj/**" />
<exclude name="**/gen/**" />
<exclude name="**/libs/armeabi/**" />
<exclude name="**/override/**" />
<exclude name="**/web/**" />
<exclude name="**/artwork/**" />
</fileset>
</copy>
<exec dir="./alt-apk/mod" executable="${bash-location}">
<arg value="fix-mod.sh"/>
</exec>
<delete>
<fileset dir="./alt-apk/mod" defaultexcludes="false">
<include name="**/*~"/>
</fileset>
</delete>
<copy todir="./alt-apk/mod" overwrite="true">
<fileset dir="./alt-apk/override/mod" />
</copy>
</target>
<target name="mod-debug-override">
<!-- todo
<copy todir="./alt-apk/mod" overwrite="true">
<fileset dir="./alt-apk/override/mod-debug" />
</copy>
-->
</target>
<target name="mod-release-override">
<!-- todo
<copy todir="./alt-apk/mod" overwrite="true">
<fileset dir="./alt-apk/override/mod-debug" />
</copy>
-->
</target>
<!--
************************************************************************
* *
* Android SDK Setup, etc *
* *
************************************************************************
-->
<target name="obfuscate" depends="hunkypunk-release">
<proguard>
-libraryjars ${android.jar}: ${external-libs-folder}
-injars ${out-classes-location}
-outjars ${obfuscate-location}/classes.min.jar
-keep public class * extends android.app.Activity
-optimizations !code/simplification/cast
</proguard>
</target>
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>