Gradle Common commands and principles, and gradle Common commands
Gradle is a new Android App compilation tool introduced by Android Studio to replace the previous Ant-based compilation system. Gradle commands such. /gradlew-v. /gradlew clean. /gradlew build. /gradlew ,. /indicates the current directory. gradlew indicates gradle wrapper. It indicates a gradle package. You can understand that gradle is encapsulated locally in this project, that is, gradle wrapper, the directory and version to which it points are declared in the/gradle/wrapper/gralde-wrapper.properties file. We recommend that you install a global gradle and configure the Path variable to avoid repeated downloading of each project, so that you can directly run gradle build after compiling the project.
After understanding the concept of gradle wrapper, the following common commands are easy to understand.
./Gradlew-v version number
./Gradlew clean clear the build folder in the 9GAG/app directory
./Gradlew build check dependencies and compile and Package
Note that. /The gradlew build command releases all the packages in the debug and release environments. If you only need to Release the release package, what should you do? The following describes a useful command ** assemble **, Such
In addition, assemble can be used with productFlavors. For more information, see the next multi-channel packaging section.
Gradle is an Android compilation system based on the groovy language (JVM-based syntax and a similar scripting language in java). google developed a dsl for Android compilation in groovy language, which is gradle. Therefore, if you encounter a gradle configuration that you don't understand, you can look at the source code of groovy. Generally, you can find a solution. Always remember that groovy is a java-like programming language, not just a scripting language.
In the popular Spring Boot microservice development framework, Groovy can be used instead of Java programming.
Copyright: This article is the original author article, reprint Please retain the source http://blog.csdn.net/offbye