Skip to content

Joint Compilation of Java & Scala code #55

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

Closed
skrawcz opened this issue Jan 15, 2016 · 2 comments
Closed

Joint Compilation of Java & Scala code #55

skrawcz opened this issue Jan 15, 2016 · 2 comments

Comments

@skrawcz
Copy link

skrawcz commented Jan 15, 2016

Hi,

I have a case where reportScoverage fails; compilation fails because I have Java code that depends on Scala code. As far as I'm aware, compilation works just fine with the default gradle scala-plugin.

I have the standard setup of scala src being under one directory, and java src being under another directory.

Any ideas or pointers on how to get around this?

Cheers,

Stefan

@maiflai
Copy link
Contributor

maiflai commented Jan 15, 2016

Hi,

Yes, the scoverage compiler plugin appears to wipe the classes directory. If you have java code then you'll need to modify the scoverage scala source directories to include it.

I suspect this should be done automatically, but in the meantime:

sourceSets.scoverage.scala.srcDir 'src/main/java'

Please could you let me know how you get on?

Thanks,
Stu

@skrawcz
Copy link
Author

skrawcz commented Jan 15, 2016

Ok cool thanks for the suggestion, I didn't try it, instead I just took the route of merging my java and scala source directories. Feel free to close this if you like :)

Cheers,

Stefan

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

2 participants