forked from geometer/FBReaderJ
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
100 lines (91 loc) · 3.35 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Acatiste.Rugaciuni.Biblia.Crestin.Roman.Ortodox" default="help">
<loadproperties srcFile="local.properties" />
<property file="ant.properties" />
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
unless="sdk.dir"
/>
<target name="init" description="Initialization...">
<fail message="Ant 1.7.0 or higher is required. Please upgrade your ant.">
<condition>
<not>
<antversion property="ant.version" atleast="1.7.0"/>
</not>
</condition>
</fail>
</target>
<target name="native" unless="native.libraries.are.uptodate">
<fail message="Native libraries are not up-to-date. Please run ndk-build manually.">
<condition>
<os family="windows" />
</condition>
</fail>
<echo message="Building native libraries..."/>
<exec executable="${ndk.dir}/ndk-build" />
<echo message="DONE (Building native libraries)"/>
</target>
<target name="check.native.libraries" depends="init">
<echo message="Checking if native libraries are up-to-date..."/>
<condition property="native.libraries.are.uptodate" value="true">
<and>
<!-- Check if libDeflatingDecompressor exists and is up to date -->
<available file="./libs/armeabi/libDeflatingDecompressor-v3.so" />
<uptodate targetfile="libs/armeabi/libDeflatingDecompressor-v3.so">
<srcfiles dir="jni/DeflatingDecompressor" includes="**/*.cpp"/>
</uptodate>
<!-- Check if libLineBreak exists and is up to date -->
<available file="./libs/armeabi/libLineBreak-v2.so" />
<uptodate property="libLineBreak-build-is-not-required" targetfile="libs/armeabi/libLineBreak-v2.so">
<srcfiles dir="jni/LineBreak" includes="**/*.cpp,**/*.c,**/*.h"/>
</uptodate>
<!-- Check if libNativeFormats exists and is up to date -->
<available file="./libs/armeabi/libNativeFormats-v4.so" />
<uptodate property="libNativeFormats-build-is-not-required" targetfile="libs/armeabi/libNativeFormats-v4.so">
<srcfiles dir="jni/NativeFormats" includes="**/*.cpp,**/*.c,**/*.h"/>
</uptodate>
</and>
</condition>
<echo message="DONE (Checking if native libraries are up-to-date)"/>
</target>
<target name="genhelp">
<exec executable="./help/generate.py">
<arg value="help/proto"/>
<arg value="help/html"/>
<arg value="assets/data/intro"/>
</exec>
</target>
<target name="-pre-build" depends="init, native, genhelp">
</target>
<!--
<target name="-pre-compile">
</target>
<target name="-post-compile">
</target>
-->
<target name="clean">
<echo message="Deleting temporary files..." />
<delete dir="gen" />
<delete dir="bin" />
<delete dir="out" />
<delete dir="assets/data/intro" />
<echo message="DONE (Deleting temporary files)" />
</target>
<target name="distclean" depends="clean">
<echo message="Deleting native libraries..." />
<delete dir="obj" />
<delete dir="libs/armeabi" />
<delete dir="libs/armeabi-v7a" />
<delete dir="libs/arm64-v8a" />
<delete dir="libs/x86_64" />
<delete dir="libs/x86" />
<delete dir="libs/mips" />
<delete dir="libs/mips64" />
<delete dir="libs/mips-r2" />
<delete dir="libs/mips-r2-sf" />
<echo message="DONE (Deleting native libraries)" />
</target>
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>