build.xml
changeset 930 ea7b1aeb5980
parent 816 2116f901307e
equal deleted inserted replaced
929:4d171bf7378a 930:ea7b1aeb5980
     1 <?xml version="1.0" encoding="UTF-8"?>
     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <project name="Beem">
     2 <project name="Beem" default="help">
     3 
     3 
     4     <!-- The local.properties file is created and updated by the 'android' tool.
     4     <!-- The local.properties file is created and updated by the 'android' tool.
     5          It contain the path to the SDK. It should *NOT* be checked in in Version
     5          It contains the path to the SDK. It should *NOT* be checked into
     6          Control Systems. -->
     6          Version Control Systems. -->
     7     <property file="local.properties" />
     7     <property file="local.properties" />
     8 
     8 
     9     <!-- The build.properties file can be created by you and is never touched
     9     <!-- The ant.properties file can be created by you. It is only edited by the
    10          by the 'android' tool. This is the place to change some of the default property values
    10          'android' tool to add properties to it.
    11          used by the Ant rules.
    11          This is the place to change some Ant specific build properties.
    12          Here are some properties you may want to change/update:
    12          Here are some properties you may want to change/update:
    13 
    13 
    14          application.package
       
    15              the name of your application package as defined in the manifest. Used by the
       
    16              'uninstall' rule.
       
    17          source.dir
    14          source.dir
    18              the name of the source directory. Default is 'src'.
    15              The name of the source directory. Default is 'src'.
    19          out.dir
    16          out.dir
    20              the name of the output directory. Default is 'bin'.
    17              The name of the output directory. Default is 'bin'.
    21 
    18 
    22          Properties related to the SDK location or the project target should be updated
    19          For other overridable properties, look at the beginning of the rules
    23           using the 'android' tool with the 'update' action.
    20          files in the SDK, at tools/ant/build.xml
    24 
    21 
    25          This file is an integral part of the build system for your application and
    22          Properties related to the SDK location or the project target should
    26          should be checked in in Version Control Systems.
    23          be updated using the 'android' tool with the 'update' action.
       
    24 
       
    25          This file is an integral part of the build system for your
       
    26          application and should be checked into Version Control Systems.
    27 
    27 
    28          -->
    28          -->
    29     <property file="build.properties" />
    29     <property file="ant.properties" />
    30 
    30 
    31     <!-- The default.properties file is created and updated by the 'android' tool, as well
    31     <!-- The project.properties file is created and updated by the 'android'
    32          as ADT.
    32          tool, as well as ADT.
    33          This file is an integral part of the build system for your application and
       
    34          should be checked in in Version Control Systems. -->
       
    35     <property file="default.properties" />
       
    36 
    33 
    37     <!-- Custom Android task to deal with the project target, and import the proper rules.
    34          This contains project specific properties such as project target, and library
    38          This requires ant 1.6.0 or above. -->
    35          dependencies. Lower level build properties are stored in ant.properties
    39     <path id="android.antlibs">
    36          (or in .classpath for Eclipse projects).
    40         <pathelement path="${sdk.dir}/tools/lib/anttasks.jar" />
       
    41         <pathelement path="${sdk.dir}/tools/lib/sdklib.jar" />
       
    42         <pathelement path="${sdk.dir}/tools/lib/androidprefs.jar" />
       
    43         <pathelement path="${sdk.dir}/tools/lib/apkbuilder.jar" />
       
    44         <pathelement path="${sdk.dir}/tools/lib/jarutils.jar" />
       
    45     </path>
       
    46 
    37 
    47     <taskdef name="setup"
    38          This file is an integral part of the build system for your
    48         classname="com.android.ant.SetupTask"
    39          application and should be checked into Version Control Systems. -->
    49         classpathref="android.antlibs" />
    40     <loadproperties srcFile="project.properties" />
    50 
       
    51     <!-- Execute the Android Setup task that will setup some properties specific to the target,
       
    52          and import the build rules files.
       
    53 
       
    54          The rules file is imported from
       
    55             <SDK>/platforms/<target_platform>/templates/android_rules.xml
       
    56 
       
    57          To customize some build steps for your project:
       
    58          - copy the content of the main node <project> from android_rules.xml
       
    59          - paste it in this build.xml below the <setup /> task.
       
    60          - disable the import by changing the setup task below to <setup import="false" />
       
    61 
       
    62          This will ensure that the properties are setup correctly but that your customized
       
    63          build steps are used.
       
    64     -->
       
    65     <setup />
       
    66 
    41 
    67     <property name="javadoc.output" value="doc/javadoc" />
    42     <property name="javadoc.output" value="doc/javadoc" />
       
    43 
       
    44     <!-- quick check on sdk.dir -->
       
    45     <fail
       
    46             message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
       
    47             unless="sdk.dir"
       
    48     />
       
    49 
       
    50 
       
    51 <!-- extension targets. Uncomment the ones where you want to do custom work
       
    52      in between standard targets -->
       
    53 <!--
       
    54     <target name="-pre-build">
       
    55     </target>
       
    56     <target name="-pre-compile">
       
    57     </target>
       
    58 
       
    59     /* This is typically used for code obfuscation.
       
    60        Compiled code location: ${out.classes.absolute.dir}
       
    61        If this is not done in place, override ${out.dex.input.absolute.dir} */
       
    62     <target name="-post-compile">
       
    63     </target>
       
    64 -->
       
    65 
       
    66     <target name="-pre-clean" >
       
    67         <delete dir="${javadoc.output}" verbose="${verbose}" />
       
    68     </target>
       
    69 
       
    70     <!-- Import the actual build file.
       
    71 
       
    72          To customize existing targets, there are two options:
       
    73          - Customize only one target:
       
    74              - copy/paste the target into this file, *before* the
       
    75                <import> task.
       
    76              - customize it to your needs.
       
    77          - Customize the whole content of build.xml
       
    78              - copy/paste the content of the rules files (minus the top node)
       
    79                into this file, replacing the <import> task.
       
    80              - customize to your needs.
       
    81 
       
    82          ***********************
       
    83          ****** IMPORTANT ******
       
    84          ***********************
       
    85          In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
       
    86          in order to avoid having your file be overridden by tools such as "android update project"
       
    87     -->
       
    88     <!-- version-tag: custom -->
       
    89     <import file="${sdk.dir}/tools/ant/build.xml" />
       
    90 
    68     <property name="external.libs.dir" value="libs" />
    91     <property name="external.libs.dir" value="libs" />
    69 
    92 
    70     <target name="clean"
    93     <target name="javadoc" depends="-setup, -build-setup, -code-gen">
    71 	description="Delete old build and dist directories">
    94 	<javadoc author="true" destdir="${javadoc.output}" doctitle="Beem javadoc" source="1.6" use="true" version="false" bootclasspathref="android.target.classpath">
    72 	<delete verbose="false" dir="${out.dir}"/>
    95 	    <sourcepath>
    73 	<delete verbose="false" dir="gen"/>
    96 	    	<pathelement location="${source.dir}" />
    74     </target>
    97 	    	<pathelement location="${gen.absolute.dir}" />
    75 
    98 	    </sourcepath>
    76     <target name="all" depends="clean,debug,javadoc"/>
       
    77 
       
    78     <target name="javadoc">
       
    79 	<javadoc author="true" destdir="${javadoc.output}" doctitle="Beem javadoc" source="1.6" sourcepath="${source.dir}" use="true" version="false" bootclasspathref="android.target.classpath">
       
    80 	    <classpath>
    99 	    <classpath>
    81 		<fileset dir="${external.libs.dir}" includes="*.jar" />
   100 		<fileset dir="${external.libs.dir}" includes="*.jar" />
    82 	    </classpath>
   101 	    </classpath>
    83 	    <link href="http://developer.android.com/reference" offline="true" packageListLoc="doc/android"/>
   102 	    <link href="http://developer.android.com/reference" offline="true" packageListLoc="doc/android"/>
    84 	    <link href="http://www.igniterealtime.org/builds/smack/docs/latest/javadoc" offline="true" packageListLoc="doc/smack"/>
   103 	    <link href="http://www.igniterealtime.org/builds/smack/docs/latest/javadoc" offline="true" packageListLoc="doc/smack"/>