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