Gradle project build tool

Gradle is a very concise project construction tool. Compared with the cumbersome xml configuration of ant and maven, gradle provides very concise commands, which are thanks to its underlying language Groovy. Currently, in Android projects, Almost all of them use gradle to manage projects. Of course, in addition to these, it also supports Java, JVM platform language, Scala, etc. It also supports C/C++ and can be seamlessly integrated with the Maven repository!

The current latest Gradle version: 2.9

official website download address: http://gradle.org/gradle-download/

(1) Download to a drive letter on Windows and unzip it, built-in groovy, no need to install, just configure the environment variables Use

(2) to set the environment variable: GRADLE_HOME path to gradle-2.9-all\gradle-2.9\
In the path, add %GRADLE_HOME%\bin

(3) Open the cmd window to test:





(4) Hellow world test:

put the following script Put it in the D drive directory. Note that it must be the name of build.gradle.




Java code copy code collection code
1.task hello << {  
2. println 'hello, world'  
3.} 



Open the cmd window and enter gradle -q hello

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326910720&siteId=291194637