Official Android Technical Documentation translation-Ant task, androidant

Source: Internet
Author: User

Official Android Technical Documentation translation-Ant task, androidant

This article is translated from the official Android technical document Ant Tasks. Original address: http://tools.android.com/tech-docs/ant-tasks.

Because of the time translation, I translated this article in several stages and grew up while translating my English, as a result, there are several different translations of the same sentence in the table.

Here we talk about Ant. Although the Android official team is vigorously promoting the Gradle-based Android Studio, there are also a lot of Eclipse, which will be translated by the way.

This document mainly describes Ant tasks. You can use Ant to build projects.

It is not easy to translate. For more information, see the source on the CSDN blog:

Http://blog.csdn.net/maosidiaoxian/article/details/44451007

The translation work is time-consuming. If you think the translation is still OK, there is a "TOP" word at the end of the article. Hope you can support it a lot. You know me. If any error occurs, please correct it. Thank you.


Ant task this function is under development. Please go Adt-dev.

Current custom task list:
  • AaptExecTask
  • AidlExecTask
  • ApkBuilderTask
  • BuildConfigTask
  • DexExecTask
  • IfElseTask
  • PropertyByReplaceTask
  • RenderScriptTask
  • SignApkTask
  • XPathTask
  • ZipAlignTask
New tasks in r20 (some replace NewSetupTask)
  • CheckEnvTask
  • ComputeDependencyTask
  • ComputeProjectClasspathTask
  • GetEmmaFilterTask
  • GetLibraryListTask
  • GetTargetTask
  • GetTypeTask
  • ManifestMergerTask

The basic (abstract) tasks used by the preceding main tasks:
  • BuildTypedTask
  • MultiFilesTask
  • SingleDependencyTask
  • SingleInputOutputTask


Com. android. ant. CheckEnvTask: <checkenv> simply checks the current environment:
  • Ant version
  • The SDK contains the platform-tools Folder.
No attribute options.
Com. android. ant. GetTypeTask <gettype> queries the project and returns the project type. Possible types are:
  • "App"
  • "Library"
  • "Test"
  • "Test-app"
 Attribute Description Required?
ProjectTypeOut Name of the property used to save the project type Yes

Com. android. ant. GetTargetTask <gettarget> parses the project target and returns the targets that must be depended on during the build process.
Attribute Description Required?
AndroidJarFileOut Property name used to save the project target and android. jar location Yes
AndroidAidlFileOut Attribute name used to save the location of framework. aidl for the project's build target Yes
BootClassPathOut Stores the attribute name of a Path object. This Pathc object contains all running jar files (android. jar + and-on APIS) Yes
TargetApiOut The property name used to save the build target API level of the project. Yes
MinSdkVersionOut Name of the attribute used to save the minSdkVersion value of the application. Yes

Com. android. ant. GetLibraryListTask <getlibs> calculates the list of library projects that the project depends on. It calculates all direct and indirect dependencies and generates a list of specific sequences.
Attribute Description Required?
LibraryFolderPathOut This attribute name is used to save a Path object that contains all library project folders.
It uses the compiled order for sorting.
Yes


Com. android. ant. ComputeDependencyTask <dependency> dependencies of computing projects. This task not only processes the detailed information of the library project, but also collects and processes all the jar libraries required by the main project and the library project. It uses the dependency scheme mentioned here for processing.

Attribute Description Required?
LibraryFolderPathOut This attribute name is used to save a Path object that contains all library project folders.
It uses the compiled order for sorting.
Yes
LibraryPackagesOut This attribute name is used to save the package names of all library projects,
Package Names are separated by semicolons.
Yes
LibraryManifestFilePathOut This attribute name is used to save the Path object that contains the list files of all databases. Yes
LibraryResFolderPathOut This attribute name is used to save a Path object that contains the resource folders of all library projects.
It uses the ordered sorting of aapt. It is in the opposite order of libraryFolderPathOut.
Yes
LibraryNativeFolderPathOut This attribute name is used to save a Path object that contains the local folders of all library projects. Yes
JarLibraryPathOut This attribute name is used to save a Path object, which contains all the jar libraries required for building. Yes
TargetApi The target API level of the project. Yes
Verbose Build details No

Other tasks will be introduced later.

Related Article

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.