bmuschko / gradle-clover-plugin

Gradle plugin for generating a code coverage report using Clover
Apache License 2.0
74 stars 49 forks source link

No possibility to set encoding for compiler #44

Closed aburmeis closed 10 years ago

aburmeis commented 10 years ago

When using the clover plugin, some tests containing UTF-8 characters in assertions fail on some machines. I think the default encoding is used. An option to set the source encoding should be offered!

phasebash commented 10 years ago

We are experiencing this problem as well.

bmuschko commented 10 years ago

I won't get to it anytime soon. Would one of you guys be interested in a contributing a pull request for this?

phasebash commented 10 years ago

Let me take a look.

phasebash commented 10 years ago

Assign to me, I got this.

bmuschko commented 10 years ago

Great, thanks. Please also add at least one integration test.

phasebash commented 10 years ago

Okay. I'm taking the encoding from the first available compiler (JavaCompile then GroovyCompile). I'll add an integration test to support this.

bmuschko commented 10 years ago

We should probably set it to UTF-8 by default.

tasks.withType(Compile) {
    options.encoding = 'UTF-8'
}
phasebash commented 10 years ago

I'm not familiar with the line above. Would this pass to the ant javac and groovyc tasks? If not, I have a pull request: https://github.com/bmuschko/gradle-clover-plugin/pull/45

Let me know what you'd prefer.

bmuschko commented 10 years ago

Ah, I forgot that we are calling Ant here. I think we can just set the encoding of the Ant task attribute encoding to UTF-8.

phasebash commented 10 years ago

That would work too. Would you like a pull request for this as well? Is there any conceivable situation where a client would really want anything other than UTF-8? I can't think of one, but it's worth asking.

Let me know and I can do the busy work.

bmuschko commented 10 years ago

I am going to review the pull request soon and let you know. Probably won't happen today but this week. Thanks for your work.

phasebash commented 10 years ago

Hey b, have you had a chance to check this one out? Cheers man.

bmuschko commented 10 years ago

Sorry, didn't find the time to do it yet.

phasebash commented 10 years ago

Thanks for the followup. I'll post another request within the next two days.

phasebash commented 10 years ago

Another go-round. Let me know what you think.

phasebash commented 10 years ago

Re-re-Posted here https://github.com/bmuschko/gradle-clover-plugin/pull/47

Please investigate at your earliest convenience.