[android自动化构建]之centos安装gradle
这是android自动化构建系列之环境配置
这里只记录部分gradle相关的配置
下载并解压
下载地址参考这里:https://services.gradle.org/distributions/,未来版本可能会变,具体可以根据自己的实际需要去下载对应版本就行了。
cd /usr/local
mkdir gradle wget https://services.gradle.org/distributions/gradle-4.9-bin.zip unzip gradle-4.9-bin.zip
yum install unzip
unzip gradle-4.9-bin.zip mv gradle-4.9/ gradle49 rm -rf gradle-2.8-bin.zip
添加环境变量
vi /etc/profile
在profile文件中添加
export GRADLE_HOME=/usr/local/gradle/gradle49
export PATH=:$GRADLE_HOME/bin
使配置文件生效:
source /etc/profile
查看gradle版本
[root@localhost gradle49]# source /etc/profile [root@localhost gradle49]# gradle -version Welcome to Gradle 4.9! Here are the highlights of this release: - Experimental APIs for creating and configuring tasks lazily - Pass arguments to JavaExec via CLI - Auxiliary publication dependency support for multi-project builds - Improved dependency insight report For more details see https://docs.gradle.org/4.9/release-notes.html ------------------------------------------------------------ Gradle 4.9 ------------------------------------------------------------ Build time: 2018-07-16 08:14:03 UTC Revision: efcf8c1cf533b03c70f394f270f46a174c738efc Kotlin DSL: 0.18.4 Kotlin: 1.2.41 Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.11 compiled on March 23 2018 JVM: 1.8.0_171 (Oracle Corporation 25.171-b10) OS: Linux 3.10.0-693.el7.x86_64 amd64
可见配置成功。
其他更详细的也可参考:https://gradle.org/install/
Jenkins+Gradle+Git+Centos 实现android持续集成、打包:https://www.jianshu.com/p/5feca12a2ada
赠人玫瑰
手留余香
我们曾如此渴望命运的波澜,到最后才发现:人生最曼妙的风景,竟是内心的淡定与从容……我们曾如此期盼外界的认可,到最后才知道:世界是自己的,与他人毫无关系!-杨绛先生
如果,您希望更容易地发现我的新博客,不妨点击一下绿色通道的【关注我】。

浙公网安备 33010602011771号