The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <project name="PROJECT_NAME" default="help"> |
| 3 | |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 4 | <!-- The local.properties file is created and updated by the 'android' tool. |
| 5 | It contains the path to the SDK. It should *NOT* be checked into |
| 6 | Version Control Systems. --> |
Xavier Ducrohet | e9fddda | 2011-11-23 15:08:24 -0800 | [diff] [blame] | 7 | <property file="local.properties" /> |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 8 | |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 9 | <!-- The ant.properties file can be created by you. It is only edited by the |
| 10 | 'android' tool to add properties to it. |
| 11 | This is the place to change some Ant specific build properties. |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 12 | Here are some properties you may want to change/update: |
| 13 | |
Piotr Gurgul | 4e8d9f1 | 2009-08-22 14:45:00 -0700 | [diff] [blame] | 14 | source.dir |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 15 | The name of the source directory. Default is 'src'. |
Piotr Gurgul | 4e8d9f1 | 2009-08-22 14:45:00 -0700 | [diff] [blame] | 16 | out.dir |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 17 | The name of the output directory. Default is 'bin'. |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 18 | |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 19 | For other overridable properties, look at the beginning of the rules |
| 20 | files in the SDK, at tools/ant/build.xml |
| 21 | |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 22 | Properties related to the SDK location or the project target should |
| 23 | be updated using the 'android' tool with the 'update' action. |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 24 | |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 25 | This file is an integral part of the build system for your |
Xavier Ducrohet | f180ab6 | 2010-06-08 18:16:36 -0700 | [diff] [blame] | 26 | application and should be checked into Version Control Systems. |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 27 | |
| 28 | --> |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 29 | <property file="ant.properties" /> |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 30 | |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 31 | <!-- The project.properties file is created and updated by the 'android' |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 32 | tool, as well as ADT. |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 33 | |
| 34 | This contains project specific properties such as project target, and library |
| 35 | dependencies. Lower level build properties are stored in ant.properties |
| 36 | (or in .classpath for Eclipse projects). |
| 37 | |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 38 | This file is an integral part of the build system for your |
Xavier Ducrohet | f180ab6 | 2010-06-08 18:16:36 -0700 | [diff] [blame] | 39 | application and should be checked into Version Control Systems. --> |
Xavier Ducrohet | 5103671 | 2011-08-23 16:28:21 -0700 | [diff] [blame] | 40 | <loadproperties srcFile="project.properties" /> |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 41 | |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 42 | <!-- quick check on sdk.dir --> |
| 43 | <fail |
Xavier Ducrohet | e9fddda | 2011-11-23 15:08:24 -0800 | [diff] [blame] | 44 | message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var" |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 45 | unless="sdk.dir" |
| 46 | /> |
Xavier Ducrohet | 96f99e9 | 2011-02-08 13:50:01 -0800 | [diff] [blame] | 47 | |
Xavier Ducrohet | 63bf713 | 2011-12-07 16:48:11 -0800 | [diff] [blame] | 48 | <!-- |
| 49 | Import per project custom build rules if present at the root of the project. |
| 50 | This is the place to put custom intermediary targets such as: |
| 51 | -pre-build |
| 52 | -pre-compile |
| 53 | -post-compile (This is typically used for code obfuscation. |
| 54 | Compiled code location: ${out.classes.absolute.dir} |
| 55 | If this is not done in place, override ${out.dex.input.absolute.dir}) |
| 56 | -post-package |
| 57 | -post-build |
| 58 | -pre-clean |
| 59 | --> |
| 60 | <import file="custom_rules.xml" optional="true" /> |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 61 | |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 62 | <!-- Import the actual build file. |
Xavier Ducrohet | 271701c | 2009-08-07 10:40:24 -0700 | [diff] [blame] | 63 | |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 64 | To customize existing targets, there are two options: |
| 65 | - Customize only one target: |
| 66 | - copy/paste the target into this file, *before* the |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 67 | <import> task. |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 68 | - customize it to your needs. |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 69 | - Customize the whole content of build.xml |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 70 | - copy/paste the content of the rules files (minus the top node) |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 71 | into this file, replacing the <import> task. |
Xavier Ducrohet | 9520e97 | 2010-04-28 15:35:12 -0700 | [diff] [blame] | 72 | - customize to your needs. |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 73 | |
| 74 | *********************** |
| 75 | ****** IMPORTANT ****** |
| 76 | *********************** |
Xavier Ducrohet | 69ff131 | 2011-08-22 20:10:38 -0700 | [diff] [blame] | 77 | In all cases you must update the value of version-tag below to read 'custom' instead of an integer, |
| 78 | in order to avoid having your file be overridden by tools such as "android update project" |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 79 | --> |
Xavier Ducrohet | 69ff131 | 2011-08-22 20:10:38 -0700 | [diff] [blame] | 80 | <!-- version-tag: VERSION_TAG --> |
Xavier Ducrohet | babf25c | 2011-02-14 15:52:12 -0800 | [diff] [blame] | 81 | <import file="${sdk.dir}/tools/ant/build.xml" /> |
Piotr Gurgul | b0b6726 | 2009-09-01 21:58:52 -0700 | [diff] [blame] | 82 | |
The Android Open Source Project | 55a2c71 | 2009-03-03 19:29:09 -0800 | [diff] [blame] | 83 | </project> |