导语
Gradle是一个基于Apache Ant和Apache Maven概念的项目自动化建构工具。它使用一种基于Groovy的特定领域语言来声明项目设置,而不是传统的XML。
当前其支持的语言限于Java、Groovy和Scala,计划未来将支持更多的语言。
Refer to wiki gradle
Linux下安装
下载安装
## downloadwget https://services.gradle.org/distributions/gradle-2.7-bin.zip## unzip unzip gradle-2.7-bin.zip## mv mv gradle-2.7 /usr/local/
配置
## vim /etc/profileexport GRADLE_HOME=/usr/local/gradle-2.7 PATH=$PATH:$GRADLE_HOME/bin## source /etc/profilesource /etc/profile
测试
root@pts/3 $ gradle -v ------------------------------------------------------------ Gradle 2.7------------------------------------------------------------ Build time: 2015-09-14 07:26:16 UTC Build number: noneRevision: c41505168da69fb0650f4e31c9e01b50ffc97893Groovy: 2.3.10Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)OS: Linux 3.10.0-229.4.2.el7.x86_64 amd64
Linux 下gradle升级
根据gradle的安装操作,就可以知道gradle升级很简单,就像安装一样,只不过在最后配置的时候稍微不一样而已
升级
##download new versionwget https://services.gradle.org/distributions/gradle-2.10-bin.zip## unzip and mvunzip gradle-2.10-bin.zip mv gradle-2.7 /usr/local/## vim /etc/profileexport GRADLE_HOME=/usr/local/gradle-2.10##source source /etc/profile
验证
root@pts/1 $ gradle -v ------------------------------------------------------------ Gradle 2.10------------------------------------------------------------ Build time: 2015-12-21 21:15:04 UTC Build number: noneRevision: 276bdcded730f53aa8c11b479986aafa58e124a6Groovy: 2.4.4Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013JVM: 1.8.0_91 (Oracle Corporation 25.91-b14)OS: Linux 3.10.0-229.4.2.el7.x86_64 amd64
作者:全栈运维
链接:https://www.jianshu.com/p/707b871f9350