project_files/Android-build/DataPackage/build.xml
author Xeli
Wed, 29 Jun 2011 18:09:24 +0200
branchhedgeroid
changeset 5383 cb217271f344
permissions -rw-r--r--
Added *.properties in Android project dirs to hgignore Added a new project which will move resources from it's own apk to the sdcard
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5383
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     2
<project name="MainActivity" default="help">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     3
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     4
<!-- The local.properties file is created and updated by the 'android'
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     5
     tool.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     6
     It contains the path to the SDK. It should *NOT* be checked into
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     7
     Version Control Systems. -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     8
    <property file="local.properties" />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
     9
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    10
    <!-- The build.properties file can be created by you and is never touched
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    11
         by the 'android' tool. This is the place to change some of the
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    12
         default property values used by the Ant rules.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    13
         Here are some properties you may want to change/update:
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    14
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    15
         source.dir
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    16
             The name of the source directory. Default is 'src'.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    17
         out.dir
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    18
             The name of the output directory. Default is 'bin'.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    19
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    20
         Properties related to the SDK location or the project target should
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    21
         be updated using the 'android' tool with the 'update' action.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    22
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    23
         This file is an integral part of the build system for your
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    24
         application and should be checked into Version Control Systems.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    25
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    26
         -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    27
    <property file="build.properties" />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    28
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    29
    <!-- The default.properties file is created and updated by the 'android'
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    30
         tool, as well as ADT.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    31
         This file is an integral part of the build system for your
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    32
         application and should be checked into Version Control Systems. -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    33
    <property file="default.properties" />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    34
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    35
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    36
    <!-- Required pre-setup import -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    37
    <import file="${sdk.dir}/tools/ant/pre_setup.xml" />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    38
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    39
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    40
<!-- extension targets. Uncomment the ones where you want to do custom work
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    41
     in between standard targets -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    42
<!--
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    43
    <target name="-pre-build">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    44
    </target>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    45
    <target name="-pre-compile">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    46
    </target>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    47
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    48
    [This is typically used for code obfuscation.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    49
     Compiled code location: ${out.classes.absolute.dir}
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    50
     If this is not done in place, override ${out.dex.input.absolute.dir}]
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    51
    <target name="-post-compile">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    52
    </target>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    53
-->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    54
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    55
    <!-- Execute the Android Setup task that will setup some properties
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    56
         specific to the target, and import the build rules files.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    57
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    58
         The rules file is imported from
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    59
            <SDK>/tools/ant/
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    60
         Depending on the project type it can be either:
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    61
         - main_rules.xml
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    62
         - lib_rules.xml
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    63
         - test_rules.xml
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    64
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    65
         To customize existing targets, there are two options:
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    66
         - Customize only one target:
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    67
             - copy/paste the target into this file, *before* the
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    68
               <setup> task.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    69
             - customize it to your needs.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    70
         - Customize the whole script.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    71
             - copy/paste the content of the rules files (minus the top node)
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    72
               into this file, *after* the <setup> task
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    73
             - disable the import of the rules by changing the setup task
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    74
               below to <setup import="false" />.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    75
             - customize to your needs.
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    76
    -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    77
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    78
    <target name="-package-resources">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    79
    <echo>Packaging resource=================================================s</echo>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    80
        <aapt executable="${aapt}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    81
                command="package"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    82
                versioncode="${version.code}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    83
                debug="${build.packaging.debug}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    84
                manifest="AndroidManifest.xml"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    85
                assets="${asset.absolute.dir}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    86
                androidjar="${android.jar}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    87
                apkfolder="${out.absolute.dir}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    88
                resourcefilename="${resource.package.file.name}"
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    89
                resourcefilter="${aapt.resource.filter}">
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    90
            <res path="${resource.absolute.dir}" />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    91
            <!-- Xeli: This is needed because if the assets are compressed they will be uncompressed by android who has some random limit set on the max file size. That limit is about 1mb -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    92
            <nocompress /> <!--forces no compression on any files in assets or res/raw -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    93
            <!-- <nocompress extension="xml" /> forces no compression on specific file extensions in assets and res/raw -->
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    94
        </aapt>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    95
    </target>
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    96
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    97
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    98
   <setup />
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
    99
cb217271f344 Added *.properties in Android project dirs to hgignore
Xeli
parents:
diff changeset
   100
</project>