jenkins+gradle+Android-sdk

Gradle3.3安装配置+ Android-sdk安装

1、Gradle3.3下载并安装

[root@jenkins ~]# ls

gradle-3.3-all.zip  jdk-8u144-linux-x64.gz

[root@jenkins ~]# unzip gradle-3.3-all.zip

[root@jenkins ~]# mv gradle-3.3 /etc/

[root@jenkins ~]# cd /etc/gradle-3.3/

[root@jenkins gradle-3.3]# ls

bin docs  getting-started.html  init.d lib  LICENSE  media NOTICE  samples  src

配置环境变量

配置环境变量:

vi /etc/profile

export GRADLE_HOME=/etc/gradle-3.3  (gradle解压后的目录)

export PATH=$PATH:$GRADLE_HOME/bin

[root@jenkins gradle-3.3]# source /etc/profile

[root@jenkins gradle-3.3]# echo$GRADLE_HOME

/etc/gradle-3.3

2、Android-sdk下载并安装

root@jenkins sdk]# pwd

/data/sdk

配置环境变量:

vi /etc/profile

export ANDROID_HOME=/data/sdk

exportPATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$PATH

"/etc/profile" 86L, 2211C written

[root@jenkins sdk]# source /etc/profile

[root@jenkins sdk]# echo $ANDROID_HOME

/data/sdk

 

3、git安装配置

yum install curl curl-devel zlib-devel perlperl-devel gettext-devel expat-devel openssl-devel perl-ExtUtils-MakeMaker gettext-devellibcurl-devel ruby -y

yum install gcc gcc-g++ make libffi-developenssl-devel.x86_64 python-devel vim curl-devel perl-ExtUtils-MakeMaker.x86_64tcl tk gettext  asciidoc xmlto -y

一般linux自带git版本很旧,会有一定问题,可以先卸载系统自带git

yum remove git
下载及安装git:
tar zxvf git-2.7.2.tar.gz
mv git-2.7.2/ git
make configure
./configure --prefix=/usr/local/git/ --with-iconv=/usr/local/libiconv--with-curl=/home/{username}/curl/

make all doc
make
make install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
source/etc/profile

==========================================================

[root@jenkins git]# git

usage: git [--version] [--help] [-C<path>] [-c name=value]

          [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]

          [-p | --paginate | --no-pager] [--no-replace-objects] [--bare]

          [--git-dir=<path>] [--work-tree=<path>][--namespace=<name>]

          <command> [<args>]

 

These are common Git commands used invarious situations:

 

start a working area (see also: git helptutorial)

  clone      Clone a repository intoa new directory

  init       Create an empty Gitrepository or reinitialize an existing one

 

work on the current change (see also: githelp everyday)

  add        Add file contents tothe index

   mv         Move or rename a file, a directory, ora symlink

  reset      Reset current HEAD tothe specified state

  rm         Remove files from theworking tree and from the index

 

examine the history and state (see also:git help revisions)

  bisect     Use binary search to find the commit thatintroduced a bug

  grep       Print lines matching apattern

  log        Show commit logs

  show       Show various types ofobjects

  status     Show the working treestatus

 

grow, mark and tweak your common history

  branch     List, create, or deletebranches

  checkout   Switch branches orrestore working tree files

  commit     Record changes to therepository

  diff       Show changes betweencommits, commit and working tree, etc

  merge      Join two or moredevelopment histories together

  rebase     Forward-port localcommits to the updated upstream head

  tag        Create, list, delete orverify a tag object signed with GPG

 

collaborate (see also: git help workflows)

  fetch      Download objects andrefs from another repository

  pull       Fetch from andintegrate with another repository or a local branch

  push       Update remote refsalong with associated objects

 

'git help -a' and 'git help -g' listavailable subcommands and some

concept guides. See 'git help<command>' or 'git help <concept>'

to read about a specific subcommand orconcept.

 

安装git遇到的问题

问题1:安装zlibzlib-devel

In file includedfrom credential-store.c:1:
cache.h:21:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:23: error: expected specifier-qualifier-list before ‘z_stream’

make: ***[credential-store.o] Error 1

缺少 zlib的头文件,开发包没装,

yuminstall zlib (系统默认已经装上)

yuminstall zlib-devel

问题2:

/bin/sh: autoreconf: command not found(centos 6.5 install qemu from source code)

# yum install install autoconfautomake libtool

问题3:

报错make[1]: *** [perl.mak] Error 2              

yum install perl-ExtUtils-MakeMaker package

问题4:

tclsh failed; using unoptimized loading
MSGFMT    po/de.msg make[1]: *** [po/de.msg] Error 127

 

yum install tcl

问题5:

/bin/sh: msgfmt: command not found
make: *** [po/build/locale/da/LC_MESSAGES/git.mo] Error 127

yum install gettext-devel

4、系统配置

系统管理-->Globl Tool Configuration,配置如下图:

jdk配置--加入相关环境变量

gradle配置--加入相关环境变量

添加git--加入相关环境变量

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值