Android.Tools.Ant

Source: Internet
Author: User

Ant

1. Ant manual Translation

Ant Handbook Translation is a BIG project!!!!!!

The link to the ant online manual is not clear.

2. Ant supports for loop

Install Ant-contrib ref[1.1]. To support in Ant's Build.xml script, refer to link ref[1.2].

The following build.xml is an ant script that iterates through the TXT file and outputs each row. ref[1.3]

1 <?XML version= "1.0" encoding= "UTF-8"?>2 <Projectname= "Android_rules"default= "Iterate">3 4 <TaskdefResource= "Net/sf/antcontrib/antlib.xml"/>5 6 <Targetname= "Iterate">7     <LoadFile Property= "Lines"Srcfile= "CopyRes.txt">8         <Filterchain>9             <FilterReaderClassName= "Org.apache.tools.ant.filters.StripLineBreaks">Ten                   <paramname= "Linebreaks"value= "\ n"/> One             </FilterReader> A         </Filterchain> -     </LoadFile> -  the     < forList= "${lines}"param= "line"> -          <Sequential> -             <Echo>@{line}</Echo> -         </Sequential> +     </ for> -  + </Target> A  at </Project>

Reference

1. Ant-contrib

1.1 Http://ant-contrib.sourceforge.net

1.2 http://ant-contrib.sourceforge.net/tasks/index.html

1.3 Http://stackoverflow.com/questions/5087929/how-to-iterate-over-the-file-content-using-ant-script

2. Ant Engineering Home Page

http://ant.apache.org/

Running Apache Ant

Command Line

Running Ant as a background process on Unix (-like) systems

Running Ant via Java

Properties

Built-in Properties

Propertyhelpers

Property Expansion

$$Expansion

Nesting of Braces

Expanding a "property Name"

If/unless Attributes

Filter

Typedef

Adds a task or a data type definition to the current project such, this new type or task can

be used in the current project.

Fileset

A fileset is a group of files. These files can be found in a directory tree starting in a base directory

and is matched by patterns taken from a number of patternsets and selectors.

Task

http://ant.apache.org/manual/Tasks/

Http://ant.apache.org/manual/Tasks/conditions.html

Http://ant-contrib.sourceforge.net/tasks/tasks/index.html

Filterset

Http://ant.apache.org/manual/Types/filterset.html

Filtersets is groups of filters. Filters can be defined as Token-value pairs or is read in from a file.

Filtersets can appear inside tasks that support this feature or <target> at the same level as-i.e., as children of <project> .

Filterchains and Filterreaders

Http://ant.apache.org/manual/Types/filterchain.html

Android.Tools.Ant

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.