用户:root
gradle版本:gradle-2.13
-
下载安装包并解压
-
[root@localhost gradle]# pwd /home/listen/gradle [root@localhost gradle]# unzip gradle-2.13-all.zip [root@localhost gradle]# ll total 68236 drwxr-xr-x. 9 listen listen 4096 Apr 25 06:18 gradle-2.13 -rw-rw-r--. 1 listen listen 69869079 May 10 01:00 gradle-2.13-all.zip [root@localhost gradle]#
-
安装
-
[root@localhost gradle]# pwd /home/listen/gradle [root@localhost gradle]# cp -r gradle-2.13 /usr/local [root@localhost bin]# vi /etc/profile #在文件末尾追加以下内容,保存 export GRADLEROOT=/usr/local/gradle-2.13 export PATH=$PATH:$GRADLEROOT/bin [root@localhost bin]# source /etc/profile
-
测试gradle命令是否能正常运行
-
[root@localhost gradle]# gradle :help Welcome to Gradle 2.13. To run a build, run gradle <task> ... To see a list of available tasks, run gradle tasks To see a list of command-line options, run gradle --help To see more detail about a task, run gradle help --task <task> BUILD SUCCESSFUL Total time: 3.017 secs This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.13/userguide/gradle_daemon.html
over!