• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

biasedbit/gradle-plugins: Collection of Gradle plugins that usually come in hand ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

biasedbit/gradle-plugins

开源软件地址(OpenSource Url):

https://github.com/biasedbit/gradle-plugins

开源编程语言(OpenSource Language):


开源软件介绍(OpenSource Introduction):

Gradle plugins

This is a collection of handy Gradle plugins I end up using over and over.

integration-test

Adds integration testing to Gradle projects, supporting java, groovy and scala. It's completely dynamic, so it'll only add source directories for the source plugins you have (e.g. java, resources and groovy but not scala).

How it works

  • It'll automatically pick directories under src/integration-test/ that match java, resources, groovy and scala, depending on whether you have any (or all) of those plugins enabled.

How to use

apply from: 'https://raw.github.com/brunodecarvalho/gradle-plugins/master/integration-test.gradle'

To add to all subprojects of a multi-project build:

subprojects {
  apply from: 'https://raw.github.com/brunodecarvalho/gradle-plugins/master/integration-test.gradle'
}

ProTip™

If you're building projects with IntelliJ idea, you can automatically add the integration test sources by configuring the module model's test sources:

idea {
  // ...
  module {
    testSourceDirs += file('src/integration-test/java')
  }
}

Or, if you're using a multi-project build:

// On the root project's build.gradle
subprojects {
  // ...
  idea {
    module {
      testSourceDirs += file('src/integration-test/java')
      testSourceDirs += file('src/integration-test/groovy')
    }
  }
}

colored-test-output

A picture worth a thousand words:

colored test output sample

How to use

apply from: 'https://raw.github.com/brunodecarvalho/gradle-plugins/master/colored-test-output.gradle'

jacoco-multiproject-aggregator

Adds coverage reports for multi-project Gradle projects.

How it works

  • Root project has no code;
  • Coverage tracking is only done for submodules;
  • A single coverage report is generated which aggregates all coverage data from subprojects.

How to use

Apply on the root build.gradle project:

allprojects {
  apply from: 'https://raw.github.com/brunodecarvalho/gradle-plugins/master/jacoco-multiproject-aggregator.gradle'
}

The plugin must be applied to all subprojects. Here's what happens:

  • If the project is a subproject, it introduces a pre-test hook to run JaCoCo agent and track coverage;
  • If the project is the root project, a new task, coverageReport, is created.

The coverageReport task depends on test task so from a clean project, running gradle coverageReport will test the code and generate a coverage report.

License

MIT.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap