Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle-cobertura-plugin:2.3.2 is not being supported in Java 8 #121

Open
aviyepuri opened this issue Oct 18, 2016 · 3 comments
Open

gradle-cobertura-plugin:2.3.2 is not being supported in Java 8 #121

aviyepuri opened this issue Oct 18, 2016 · 3 comments

Comments

@aviyepuri
Copy link

aviyepuri commented Oct 18, 2016

Hi
We just got migrated to Gradle 3 and Java 1.8.
The cobertura-plugin ( net.saliman:gradle-cobertura-plugin:2.3.2 ) that we declare in build.gradle file isn't behaving as expected.
But when I change the project SDK to 1.7 the build was success.
Can't we use the above plugin with Java 1.8, or is there any other version that I need to use for 1.8?

Here is the stack trace that I see:

Cobertura 2.1.1 - GNU GPL License (NO WARRANTY) - See COPYRIGHT file
Unable to instrument file xxxxxxxx

@stevesaliman
Copy link
Owner

Unfortunately, there is a long standing bug with Cobertura and Java 8 when using certain Java 8 features like lambdas, documented in [https://github.com/cobertura/cobertura/issues/176].

I've been following that issue waiting for a fix, and as soon as it gets fixed, I'll release a new version of the plugin that uses that version of cobertura.

Sorry I couldn't be of more help,

Steve

@silvaw
Copy link

silvaw commented Mar 27, 2018

Hi @stevesaliman
Latest cobertura pull add some Java 8 support.
How can I contribute to your plugin to support latest commit from cobertura?

Thx,
Will

@stevesaliman
Copy link
Owner

Thank you @silvaw for the offer. Not too many people offer to jump in and help :-)

As soon as the Cobertura team releases a new version to the standard repositories, we will be able to bump the default coberturaVersion the plugin brings in. It doesn't look like any of the command line arguments have changed, so there should be nothing more to do than a simple version bump.

Until then, if you want to use the latest Cobertura commit with the gradle cobertura plugin, you can do it in two steps:

  1. clone the main cobertura repository and install int locally with mvn -DskipTests install. Unfortunately, this would need to be done on every machine in your environment that needs to use the new version of cobertura. Alternately, you could create the artifacts needed and upload them to your own repository.
  2. Add coberturaVersion = '2.1.2-SNAPSHOT' to the cobertura block of your build.gradle file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants