[Android Studio authoritative tutorial] AS build system-Gradle, android-gradle
In the previous articles, we mainly talked about the configuration of AS. Today, we will start to understand the [build system]-Gradle of Android Studio.
What is Gradle? Gradle is based on the Groovy language and mainly oriented to Java applications. An automated build tool based on DSL (domain-specific language) syntax. [Baidu encyclopedia]
Contains a top-level Build File and each module Build File in AS, such
Here we will focus on [top-level configuration files, module configuration files, and sdk configuration files]
1. level Configuration File
2. module configuration file
Note:
minifyEnable false
Apk means: For detailed configuration reference: [Android Studio-automatically delete unused resources, to reduce the apk weight]
Since the module is described as follows, there are generally three dependency relationships. The six methods for adding dependency relationships are described in detail here:
[[Android Studio authoritative tutorial] AS six methods for adding third-party libraries (Jar, module, so, etc )]
Dependencies {// Module (Module) depends on compile project (": lib") // remote binary dependency on compile 'com. android. support: appcompat-v7: 19.0.1 '// Local Binary dependency compile fileTree (dir: 'libs', include :['*. jar '])}
3. SDK and NDK configuration file
Two paths are configured here: the first is the sdk and the second is the ndk. We can configure them in the Project StrucTrue button:
The basic understanding of Gradle has been here for a long time. We will talk about multi-channel packaging, ndk configuration, and so on later, so there will be no problems with development, in the next article, we will talk about the AS signature packaging Apk and the generation of the jks signature file.
If you are interested, follow my Blog. My column will continue to update the Android Studio tutorial and the NDK configuration and compilation at the 2015 I/O conference, I will share it with you all.
I also received an invitation from CSND lecturers. Later I will record these Android Studio tutorials as videos and publish them to the CSDN Institute.
/*** -------------- * Welcome to reprint | reprinted please note * -------------- * if it is helpful to you, please click | top | * -------------- * Please keep humble | you will go further * -------------- * @ author zsl * @ github https://github.com/yy1300326388 * @ blog http://blog.csdn.net/yy1300326388 */