您的位置:首页 > 产品设计 > UI/UE

二手吧软件学习build.xml

2016-02-16 15:17 411 查看
队友找了一个做软件的同学做的二手书软件,用的阿里云的服务器,好像不打算继续使用这个代码了,但是我还是准备继续学学完这个项目

看一下build.xml//Ant构建文件。构建文件定义了构建过程  http://zhidao.baidu.com/link?url=da8pPQrUaKapZAdmpIL0vlNdjhVCB40mFW-bE9H4iqGWcnSl5PdL3If6zlM4_tHe-6yKA8v2qAiFhjpw1KrvMa

<?xml version="1.0" encoding="UTF-8"?>

<project name="InitActivity" default="help">

    <!-- The local. file is created and  by the 'android' tool.

         It contains the path to the SDK. It should *NOT* be checked into  Version Control Systems. -->

    <property file="local.properties" /> //性质、属性

    <!-- The ant.properties file can be created by you. It is only edited by the  'android' tool to add properties to it.

         This is the place to change some Ant specific build properties. 

//http://baike.baidu.com/link?url=Emf8HGZRK6Rm1rQPSgBI2FfLTu0Rz8PDFV-qTUwvHqtLfHZ3ADPHh37q9yrYEsW03Qy4lBHa6ag-MYy6XDlT__

         Here are some properties you may want to change/update:

         source.dir

             The name of the source directory. Default is 'src'.//资源目录

         out.dir

             The name of the output directory. Default is 'bin'.

         For other overridable properties, look at the beginning of the rules files in the SDK, at tools/ant/build.xml  //重写

         Properties related to the SDK location or the project target should  be updated using the 'android' tool with the 'update' action.

         This file is an integral part of the build system for your  application and should be checked into Version Control Systems.  -->

    <property file="ant.properties" />

    <!-- if sdk.dir was not set from one of the property file, then get it from the ANDROID_HOME env var.

         This must be done before we load project.properties since  the proguard config can use sdk.dir -->

    <property environment="env" />

    <condition property="sdk.dir" value="${env.ANDROID_HOME}">//环境、状态

        <isset property="env.ANDROID_HOME" />    //http://qiang106.iteye.com/blog/2097833

    </condition>

    <!-- The project.properties file is created and updated by the 'android' sdtool, as well as ADT.

         This contains project specific properties such as project target, and library dependencies. Lower level build properties are stored in ant.properties

         (or in .classpath for Eclipse projects).

         This file is an integral //积分part of the build system for your application and should be checked into//深入调查 Version Control Systems. -->

    <load properties srcFile="project.properties" />

    <!-- quick check on sdk.dir -->

    <fail

            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.//可变的"

            unless="sdk.dir"

    />

    <!--Import per project custom build rules if present at the root of the project.

        This is the place to put custom intermediary targets such as://自定义中介目标

            -pre-build//预建立

            -pre-compile//预编译

            -post-compile (This is typically used for code obfuscation .//这通常用于代码混淆 Compiled code location: ${out.classes.absolute.dir}

                           If this is not done in place, override ${out.dex.input.absolute.dir})

            -post-package

            -post-build

            -pre-clean

    -->

    <import file="custom_rules.xml" optional="true" />

    <!-- Import the actual build file.

         To customize existing targets, there are two options:

         - Customize only one target:

             - copy/paste the target into this file, *before* the

               <import> task.

             - customize it to your needs.

         - Customize the whole content of build.xml

             - copy/paste the content of the rules files (minus the top node)

               into this file, replacing the <import> task.

             - customize to your needs.

         ***********************

         ****** IMPORTANT ******

         ***********************

         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,

         in order to avoid having your file be overridden by tools such as "android update project"

    -->

    <!-- version-tag: 1 -->

    <import file="${sdk.dir}/tools/ant/build.xml" />

</project>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息