-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_rules.xml
92 lines (86 loc) · 3.7 KB
/
custom_rules.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
<?xml version="1.0" encoding="UTF-8"?>
<project name="imported">
<loadproperties srcFile="${tools.dir}/local.properties" />
<exec executable="tools/makerev.sh"/>
<target name="-create-database">
<!-- Generating SQL content -->
<echo message="Generating SQL database" />
<exec failonerror="true" executable="make">
<arg line="-C ${tools.dir}" />
<arg value="bsc" />
</exec>
<exec failonerror="true" executable="${tools.dir}/tools/makeres.py">
<arg value="sqlite" />
<arg value="${tools.dir}/raw" />
<arg value="--android" />
<arg line="--db-compare-with res/values/dbversion.xml" />
<arg value="--gps" />
<arg line="--gps-cache gps.csv" />
<arg line="--pre-filter filter.map" />
</exec>
<copy todir="res/xml/">
<fileset dir="/tmp/businfo/">
<include name="**/htdb_chunk*.xml"/>
</fileset>
</copy>
<copy file="/tmp/businfo/dbstats.xml" tofile="res/values/dbstats.xml"/>
<copy file="/tmp/businfo/gps.xml" tofile="res/xml/gps.xml"/>
</target>
<!-- Custom user gmaps api keys
A $KEYFILE file holding both gmaps api keys (for debug and release)
must exists in order for the build to complete successfully. This is
a 2 lines file of the form:
gmaps.key.debug=key1
gmaps.key.release=key2
-->
<loadproperties srcFile="gmaps.properties" />
<target name="-gmaps-keysetup">
<condition property="gmaps.key" value="${gmaps.key.debug}" else="${gmaps.key.release}">
<equals arg1="${build.target}" arg2="debug"/>
</condition>
<echo message="Setting up the ${build.target} GMaps key"/>
<exec failonerror="true" executable="./tools/gmapskey.sh">
<arg value="${gmaps.key}" />
</exec>
</target>
<!-- Copy android support library -->
<property name="support.lib" value="android-support-v4.jar"/>
<target name="-support-lib">
<copy file="${sdk.dir}/extras/android/support/v4/${support.lib}" tofile="${jar.libs.dir}/${support.lib}"/>
</target>
<target name="api">
<javadoc
classpath="${sdk.dir}/platforms/android-2.1/android.jar"
destdir="api"
sourcepath="src"
packagenames="com.monnerville.transports.herault.*"
author="true"
stylesheetfile="android.css"
version="true" />
</target>
<target name="dist" depends="clean,release">
<echo message="Getting application version"/>
<exec failonerror="true" executable="./tools/getrev.sh" outputproperty="app.version"/>
<property name="release.signed" value="${ant.project.name}-${app.version}-signed.apk"/>
<copy file="bin/${ant.project.name}-release.apk" tofile="bin/${release.signed}"/>
</target>
<target name="nbdebug" depends="debug,install" />
<target name="-pre-build" depends="-gmaps-keysetup,-create-database,-support-lib" />
<target name="-pre-clean">
<exec failonerror="true" executable="make">
<arg line="-C ${tools.dir}" />
<arg value="clean" />
</exec>
</target>
<target name="-native-libs">
<echo message="Compiling native Go libs"/>
<mkdir dir="${jar.libs.dir}/armeabi"/>
<mkdir dir="${jar.libs.dir}/x86"/>
<exec failonerror="true" executable="tools/gobuild-linux-arm.sh">
<arg line="-o ${jar.libs.dir}/armeabi/libstats.so native/stats.go" />
</exec>
<exec failonerror="true" executable="tools/gobuild-linux-386.sh">
<arg line="-o ${jar.libs.dir}/x86/libstats.so native/stats.go" />
</exec>
</target>
</project>