This repository was archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
76 lines (66 loc) · 2.55 KB
/
build.xml
File metadata and controls
76 lines (66 loc) · 2.55 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="AndEngine" default="help">
<!-- Ant contrib -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="./ext/libs/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<!-- Boilerplate -->
<loadproperties srcFile="local.properties"/>
<property file="ant.properties"/>
<property environment="env"/>
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME"/>
</condition>
<loadproperties srcFile="project.properties"/>
<!-- Quick check if sdk.dir exists -->
<fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable." unless="sdk.dir"/>
<!-- Macros -->
<macrodef name="property-require" description="Check if a property is set and not empty.">
<attribute name="property"/>
<sequential>
<fail message="Property '@{property}' must be set!">
<condition>
<not>
<isset property="@{property}"/>
</not>
</condition>
</fail>
<fail message="Property '@{property}' must not be empty!">
<condition>
<equals arg1="${@{property}}" arg2=""/>
</condition>
</fail>
</sequential>
</macrodef>
<!-- Targets -->
<target name="build-native" depends="-pre-build-native,-clean-native,-build-native"/>
<target name="-pre-build-native">
<property-require property="ndk"/>
<condition property="do.build-native">
<equals arg1="${ndk}" arg2="true"/>
</condition>
<condition property="do.clean-native">
<not>
<equals arg1="${ndk}" arg2="true"/>
</not>
</condition>
</target>
<target name="-build-native" if="do.build-native">
<exec executable="${ndk.dir}/ndk-build" failonerror="true">
<!-- 8 Threads -->
<arg value="-j8"/>
</exec>
</target>
<target name="-clean-native" depends="android_rules.clean" if="do.clean-native">
<exec executable="${ndk.dir}/ndk-build" failonerror="true">
<arg value="clean"/>
</exec>
</target>
<target name="-pre-build">
<antcall target="build-native"/>
</target>
<!-- version-tag: custom -->
<import file="${sdk.dir}/tools/ant/build.xml"/>
</project>