Android持续集成解决方案,Android持续集成

Android 持续集成

Lint

参考:

1.    进入jenkins插件管理,找到Android Lint Plugin,选择并且安装.之后重启Jenkins。

2.    在jenkins的job中,在build targets后面加上一项lint。

3.    构建job。你就可以看见lint的结果了

4.    之后你还可以在job的主页看到lint结果的变化趋势。

0818b9ca8b590ca3270a3433284dd417.png

Findbugs

参考地址:

1.    下载Find’Bugs并且安装,假设安装在/data/findbugs.

下载地址:

或者

2.    从findbugs的安装目录lib下面拷贝findbugs-ant.jar到ant的lib目录下面

3.    在local.property文件中加入,也可以在jenkins的ant构建中加入

findbugs.home=C:\\develope\\findbugs-3.0.0

4.    在工程的build.xml文件中加入以下任务

excludeFilter="findbugs-exclude.xml">

5.    不要包含对R文件的check,在工程下面创建findbugs-exclude.xml。

6.    在Jenkins中进入插件管理,下载安装FindBugs Plugin并且重启Jenkins。

7.    在job的ant targets中加入findbugs。

8.    最后加上publish findbugs analysis results

**/findbugs.xml

0818b9ca8b590ca3270a3433284dd417.png

Checkstyle

参考地址:

下载checkstyle

1.    将文件解压到一个指定的地方

2.    在ant build.xml中加入

classpath="${checkstyle.home}/checkstyle-5.7-all.jar"/>

failureProperty="checkstyle.failure"

failOnViolation="false">

tofile="reports/checkstyle.xml"/>

3.    在job ant构建中加入以下的属性定义:

checkstyle.home= C: \\develope\\checkstyle-5.7

4.    在ant target中加入checkstyle

5.    在构建后操作中加入Publish Checkstyle analysis results. 填入**/checkstyle.xml

0818b9ca8b590ca3270a3433284dd417.png

如果你想要加入发送邮件的功能:

参考

http://checkstyle.sourceforge.net/anttask.html

depends="checkstyle"

if="checkstyle.failure"

description="Sends email ifcheckstyle detected code conventions violations.">

tolist="someone@some.domain,someoneelse@some.domain"

mailhost="mailbox.some.domain"

subject="Checkstyle violation(s)in project ${ant.project.name}"

files="checkstyle_report.html"/>

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值