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

stevesaliman/gradle-cobertura-plugin: Gradle Cobertura Plugin

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

开源软件名称(OpenSource Name):

stevesaliman/gradle-cobertura-plugin

开源软件地址(OpenSource Url):

https://github.com/stevesaliman/gradle-cobertura-plugin

开源编程语言(OpenSource Language):

Groovy 91.0%

开源软件介绍(OpenSource Introduction):

Usage

See the Usage page for complete details on how to use this plugin.

News

October 31, 2020

It's been almost a year since Gradle first released version 6.2, with its breaking change to an internal Gradle API, and most people have probably updated gradle to at least taht version. It is probably time to make the fix for this issue official. Version 4.0.0 of the Cobertura plugin now supports Gradle 6.2+, but it no longer works with 6.1 or older. If you want to continue using this plugin, you'll need to either update Gradle to at least 6.2, or use an older version of the plugin.

June 20, 2020

Version 3.0.1-SNAPSHOT has been published to the Maven Snapshot repository, which should solve issues running with Gradle 6.2+. I appreciate any feedback on how this new version runs in any version of Gradle.

November 10, 2019

Version 3.0.0 of the Cobertura plugin now supports Gradle 6.0, with thanks to Roberto Perez Alcolea. This release no longer supports or works on older versions of Java and Gradle. Users will need to update to at least Java 8 and Gradle 5.1

March 23, 2019

Version 2.6.1 is a minor release that is meant to get the Cobertura plugin working better with the Scoverage Scala plugin. Thank you to Eyal Roth (@eyalroth) for his suggestions and code examples.

January 5, 2019

Version 2.6.0 supports Gradle 5.1, with thanks to Roberto Alcolea (@rpalcolea)

Introduction

This plugin was inspired by the Cobertura plugin by valkolovos and jvanderpol. This plugin is an improvement over the the original in a few important ways.

  • The biggest difference is that this fork of the plugin runs a Cobertura coverage report even if tests fail. If there are multiple test tasks, it will run the cobertura reports after the last test task that ran. Note that if there is a test failure other test tasks won't necessarily run. This is consistent with Gradle's behavior when running multiple testing tasks.

  • Per http://forums.gradle.org/gradle/topics/is_the_new_plugin_extension_approach_the_way_to_go, I've replaced conventions with extensions.

  • This plugin supports Cobertura's coverage check and merge functions.

  • I've worked a lot with build lifecycle to make sure that things only happen if they need to happen, and when they need to happen. For example, we only instrument code if the user wanted to generate coverage reports, and then it instruments right before the tests run so that time is not spent instrumenting if the build fails due to some earlier error.

  • This plugin is published and available on Maven Central, separating use of the plugin from the source tree on GitHub.

  • Most importantly, this plugin is clearly licensed as an Apache 2.0 licensed project so users can use this plugin as part of any project they are building.

Todo:

This is still a work in progress. If anyone would like to help out, here are a few things I'm still trying to accomplish.

  • This plugin needs some robust unit tests. The testclient directory has a little java project that I use to manually test different scenarios, but we could really use some proper unit tests.

  • Did I mention testing? :-) As issues are resolved, it would great if I could have unit tests that made sure that things fixed for prior issues are still fixed. This is becoming more important as I do more work with multi project builds and multi language projects.

Building

To build this plugin from source use the following command:

./gradlew install

This will create a local jar and put it in your local maven repository. you can reference it in your builds like this:

buildscript {
	repositories {
		mavenLocal()
	}
	dependencies {
		classpath 'net.saliman:gradle-cobertura-plugin:3.0.0'
	}
}



鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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