原文:http://developer.android.com/sdk/installing/studio-build.html
Android Studio构建系统是用来创建、测试、运行和打包你的程序的工具集。该构建系统于Android Studio相互独立,所以你可以通过Android Studio或者命令行来调用它。当你写好你的应用之后,你可以用构建系统的的特性来:
- 自定义、配置和拓展构建进程(Customize, configure, and extend the build process)
- 通过同一个项目创建多个拥有不同特性的APK
- 重用代码和资源
Overview of the Build System
Android Studio构建系统包含了Gradle的Android插件。Gradle是一个高级构造工具集,可以管理依赖和允许你定义自己的构造逻辑。很多软件项目用Gradle去管理他们的构建系统(builds)。Gradle的Android插件不依赖于Android Studio,尽管Android Studio与它能完美结合在一起。这意味着:
- 你可以通过命令行或者没有安装Android Studio的机器上(例如continuous integration servers)来构建你的Android应用
- You can build your Android apps from Android Studio with the same custom build configuration and logic as when you build from the command line.
无论构建一个项目通过的命令行、远程机器(remote machine,)或Android Studio,输出的结果总是相同的。
Build configuration
项目的构建配置定义在Gradle build files,他是Gradle通过纯文本用句法和选项和Andorid插件来配置以下几个方面的: