-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
149 lines (120 loc) · 5.78 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
<project name="apm" default="release">
<property file="build.properties"/>
<property name="version.core" value="${app.build.verision}.${app.build.number}"/>
<property name="app.short-name" value="apm" />
<property name="version" value="0.7.2" />
<property name="version.apm" value="${version}" />
<property name="year" value="2011-2021" />
<property name="name.src" value="src" />
<property name="name.dest" value="dest" />
<property name="name.bin" value="bin" />
<property name="name.build" value="build" />
<property name="name.builds" value="builds" />
<property name="name.img" value="img" />
<property name="name.apm-gui" value="apm-gui" />
<property name="name.apm-core" value="apm-core" />
<property name="name.file.icon" value="apm64.png" />
<property name="app.base" value="${basedir}" />
<property name="app.prop-default" value="${app.base}/prop-default" />
<property name="app.icon" value="${app.base}/${name.img}/${name.file.icon}" />
<property name="app.platform-tools" value="${app.base}/platform-tools" />
<property name="app.platform-tools.nix" value="${app.platform-tools}/nix" />
<property name="app.platform-tools.win" value="${app.platform-tools}/win" />
<property name="app.platform-tools.mac" value="${app.platform-tools}/mac" />
<property name="app.java.main-class" value="ru.ucoz.megadiablo.android.apm.Runner" />
<property name="app.lib" value="${basedir}/libs" />
<property name="app.lib.adb-helper" value="${app.lib}/adb-helper.jar" />
<property name="app.libs" value="" />
<property name="app.src" value="${app.base}/${name.src}" />
<property name="app.src-gui" value="${app.base}/${name.src}-gui" />
<property name="app.src-core" value="${app.base}/${name.src}-core" />
<property name="app.src-jtatoo" value="${app.base}/${name.src}-jtatoo" />
<property name="app.src-data" value="${app.base}/${name.src}-data" />
<property name="app.license.file" value="${app.base}/LICENSE" />
<property name="app.build" value="${app.base}/${name.bin}/${name.build}" />
<property name="app.build.src" value="${app.build}/${name.src}" />
<property name="app.build.bin" value="${app.build}/${name.bin}" />
<property name="app.build.jar" value="${app.base}/${name.builds}/${name.apm-gui}" />
<property name="app.build.jar.name" value="${app.build.jar}/${app.short-name}-${version.apm}.jar" />
<property name="app.build.zip" value="${app.base}/${name.builds}/${name.apm-gui}" />
<property name="app.build.zip.name" value="${app.build.zip}/${app.short-name}-${version.apm}" />
<property name="app.build.zip.name.nix" value="${app.build.zip.name}-nix.zip" />
<property name="app.build.zip.name.win" value="${app.build.zip.name}-win.zip" />
<property name="app.build.zip.name.mac" value="${app.build.zip.name}-mac.zip" />
<target name="release" depends="version,compile,build-jar,build-zip,clean">
<echo>Finished</echo>
</target>
<target name="version">
<echo>GUI : ${version.apm}</echo>
<echo>Core : ${version.core}</echo>
</target>
<target name="clean">
<delete dir="${app.build}" />
</target>
<target name="create-dir">
<mkdir dir="${app.build}" />
<mkdir dir="${app.build.src}" />
<mkdir dir="${app.build.bin}" />
</target>
<target name="copy">
<copy todir="${app.build.src}" overwrite="true">
<fileset dir="${app.src-gui}" includes="**/*" />
<fileset dir="${app.src-core}" includes="**/*" />
<fileset dir="${app.src-jtatoo}" includes="**/*" />
<fileset dir="${app.src-data}" includes="**/*" />
</copy>
</target>
<target name="precompile" depends="clean,create-dir,copy">
<replace dir="${app.build.src}" encoding="UTF-8">
<replacefilter token="%%VERSION%%" value="${version.apm}" />
<replacefilter token="%%VERSION_CORE%%" value="${version.core}" />
<replacefilter token="%%YEAR%%" value="${year}" />
</replace>
<echo>Finished</echo>
</target>
<target name="compile" depends="precompile">
<javac srcdir="${app.build.src}" destdir="${app.build.bin}" classpath="${app.libs}" debug="off" encoding="UTF-8">
</javac>
</target>
<target name="build-jar" depends="">
<delete file="${app.build.jar.name}" />
<jar destfile="${app.build.jar.name}">
<fileset dir="${app.build.bin}" includes="**/*.class" excludes="com/adbhelper/*.class" />
<fileset dir="${app.build.src}" includes="**/*" excludes="**/*.java" />
<fileset file="${app.license.file}"/>
<manifest>
<attribute name="Manifest-Version" value="1.1" />
<attribute name="Class-Path" value="." />
<attribute name="Main-Class" value="${app.java.main-class}" />
<attribute name="LICENSE" value="GNU GPLv3" />
</manifest>
</jar>
</target>
<target name="build-zip" depends="">
<delete file="${app.build.zip.name}" />
<delete file="${app.build.zip.name.nix}" />
<delete file="${app.build.zip.name.win}" />
<delete file="${app.build.zip.name.mac}" />
<zip destfile="${app.build.zip.name.nix}">
<fileset file="${app.build.jar.name}" />
<fileset file="${app.icon}" />
<fileset file="${app.license.file}" />
<fileset dir="${app.prop-default}" includes="*.prop" />
<fileset dir="${app.platform-tools.nix}" includes="*" />
</zip>
<zip destfile="${app.build.zip.name.win}">
<fileset file="${app.build.jar.name}" />
<fileset file="${app.icon}" />
<fileset file="${app.license.file}" />
<fileset dir="${app.prop-default}" includes="*.prop" />
<fileset dir="${app.platform-tools.win}" includes="*" />
</zip>
<zip destfile="${app.build.zip.name.mac}">
<fileset file="${app.build.jar.name}" />
<fileset file="${app.icon}" />
<fileset file="${app.license.file}" />
<fileset dir="${app.prop-default}" includes="*.prop" />
<fileset dir="${app.platform-tools.mac}" includes="*" />
</zip>
</target>
</project>