[关闭]
@mSolo 2015-04-13T23:07:57.000000Z 字数 1307 阅读 1585

持续集成之路 —— Stockeye CalendarStock 库开发实录

Jekins Android CI 持续集成 TDD


库项目结构

  1. | build.gradle
  2. | src
  3. | |- main
  4. | |- java/com/msolo/stockeye/calendarstock/UtilCalTime.java
  5. | |- test
  6. | |- java/com/msolo/stockeye/calendarstock/UtilCalTimeTest.java

构建脚本(无 Jacoco)

  1. apply plugin: 'java'
  2. version = 0.1
  3. repositories {
  4. mavenCentral()
  5. }
  6. dependencies {
  7. testCompile 'junit:junit:4.11'
  8. }
  9. task libJavadocs(type: Javadoc) {
  10. source = sourceSets.main.allJava
  11. }

Jenkins 项目配置(无 JaCoCo)

项目名称:android_stockeye_cal_lib

持续集成(无 JaCoCo)








构建脚本(增加 JaCoCo)

  1. // 增加的部分
  2. apply plugin: "jacoco"
  3. jacocoTestReport {
  4. group = "reporting"
  5. description = "Generate Jacoco coverage reports after running tests."
  6. reports {
  7. xml.enabled true
  8. html.enabled true
  9. csv.enabled false
  10. }
  11. //classDirectories = fileTree(dir: 'build/classes/main', include: 'com/thc/**')
  12. //sourceDirectories = fileTree(dir: 'scr/java', include: 'com/thc/**')
  13. additionalSourceDirs = files(sourceSets.main.allJava.srcDirs)
  14. }

Jenkins 项目配置(增加 Jacoco)

持续集成(增加 JaCoCo)



添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注