author | Ryan C. Gordon <icculus@icculus.org> |
Sun, 28 Aug 2016 13:36:13 -0400 | |
changeset 10286 | 3b884985835c |
parent 6631 | 47ab7ba21530 |
permissions | -rw-r--r-- |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="UTF-8"?> |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
2 |
<!-- This should be changed to the name of your project --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
3 |
<project name="SDLActivity" default="help"> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
4 |
|
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
5 |
<!-- The local.properties file is created and updated by the 'android' tool. |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
6 |
It contains the path to the SDK. It should *NOT* be checked into |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
7 |
Version Control Systems. --> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
8 |
<property file="local.properties" /> |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
9 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
10 |
<!-- The ant.properties file can be created by you. It is only edited by the |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
11 |
'android' tool to add properties to it. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
12 |
This is the place to change some Ant specific build properties. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
13 |
Here are some properties you may want to change/update: |
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
14 |
|
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
15 |
source.dir |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
16 |
The name of the source directory. Default is 'src'. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
17 |
out.dir |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
18 |
The name of the output directory. Default is 'bin'. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
19 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
20 |
For other overridable properties, look at the beginning of the rules |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
21 |
files in the SDK, at tools/ant/build.xml |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
22 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
23 |
Properties related to the SDK location or the project target should |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
24 |
be updated using the 'android' tool with the 'update' action. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
25 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
26 |
This file is an integral part of the build system for your |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
27 |
application and should be checked into Version Control Systems. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
28 |
|
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
29 |
--> |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
30 |
<property file="ant.properties" /> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
31 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
32 |
<!-- if sdk.dir was not set from one of the property file, then |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
33 |
get it from the ANDROID_HOME env var. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
34 |
This must be done before we load project.properties since |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
35 |
the proguard config can use sdk.dir --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
36 |
<property environment="env" /> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
37 |
<condition property="sdk.dir" value="${env.ANDROID_HOME}"> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
38 |
<isset property="env.ANDROID_HOME" /> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
39 |
</condition> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
40 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
41 |
<!-- The project.properties file is created and updated by the 'android' |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
42 |
tool, as well as ADT. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
43 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
44 |
This contains project specific properties such as project target, and library |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
45 |
dependencies. Lower level build properties are stored in ant.properties |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
46 |
(or in .classpath for Eclipse projects). |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
47 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
48 |
This file is an integral part of the build system for your |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
49 |
application and should be checked into Version Control Systems. --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
50 |
<loadproperties srcFile="project.properties" /> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
51 |
|
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
52 |
<!-- quick check on sdk.dir --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
53 |
<fail |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
54 |
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." |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
55 |
unless="sdk.dir" |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
56 |
/> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
57 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
58 |
<!-- |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
59 |
Import per project custom build rules if present at the root of the project. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
60 |
This is the place to put custom intermediary targets such as: |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
61 |
-pre-build |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
62 |
-pre-compile |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
63 |
-post-compile (This is typically used for code obfuscation. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
64 |
Compiled code location: ${out.classes.absolute.dir} |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
65 |
If this is not done in place, override ${out.dex.input.absolute.dir}) |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
66 |
-post-package |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
67 |
-post-build |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
68 |
-pre-clean |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
69 |
--> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
70 |
<import file="custom_rules.xml" optional="true" /> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
71 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
72 |
<!-- Import the actual build file. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
73 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
74 |
To customize existing targets, there are two options: |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
75 |
- Customize only one target: |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
76 |
- copy/paste the target into this file, *before* the |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
77 |
<import> task. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
78 |
- customize it to your needs. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
79 |
- Customize the whole content of build.xml |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
80 |
- copy/paste the content of the rules files (minus the top node) |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
81 |
into this file, replacing the <import> task. |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
82 |
- customize to your needs. |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
83 |
|
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
84 |
*********************** |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
85 |
****** IMPORTANT ****** |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
86 |
*********************** |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
87 |
In all cases you must update the value of version-tag below to read 'custom' instead of an integer, |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
88 |
in order to avoid having your file be overridden by tools such as "android update project" |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
89 |
--> |
6631
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
90 |
<!-- version-tag: 1 --> |
47ab7ba21530
Updated the Android project template and README.android
Sam Lantinga <slouken@libsdl.org>
parents:
4965
diff
changeset
|
91 |
<import file="${sdk.dir}/tools/ant/build.xml" /> |
4965
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
92 |
|
91d0085b7560
Added the Android project and lots of info to README.android
Sam Lantinga <slouken@libsdl.org>
parents:
diff
changeset
|
93 |
</project> |