Android.Tools.Ant

來源:互聯網
上載者:User

標籤:android   style   blog   http   io   ar   color   sp   for   

ant

1. ant手冊翻譯

ant手冊翻譯是一項大工程!!!!!!

ant線上手冊的連結好不明確。

 

2. ant 支援for迴圈

安裝ant-contrib Ref[1.1]. 要在ant的build.xml指令碼中支援,參考連結Ref[1.2]。

下面的build.xml是遍曆txt檔案,將每一行進行輸出的ant指令碼。Ref[1.3]

 1 <?xml version="1.0" encoding="UTF-8"?> 2 <project name="android_rules" default="iterate"> 3  4 <taskdef resource="net/sf/antcontrib/antlib.xml"/> 5  6 <target name="iterate"> 7     <loadfile property="lines" srcFile="CopyRes.txt"> 8         <filterchain> 9             <filterreader classname="org.apache.tools.ant.filters.StripLineBreaks">10                   <param name="linebreaks" value="\n"/>11             </filterreader>12         </filterchain>13     </loadfile>14 15     <for list="${lines}" param="line">16          <sequential>17             <echo>@{line}</echo>18         </sequential>19     </for>20 21 </target>22 23 </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 工程首頁

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 that 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 are 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 are groups of filters. Filters can be defined as token-value pairs or be read in from a file.

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

FilterChains and FilterReaders

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

   
   
   
   
   
   
   
   
   
   
   
   

Android.Tools.Ant

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.