-
Notifications
You must be signed in to change notification settings - Fork 38
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
scoverage plugin not working for project iwht mix of java and scala code #102
Comments
Issue #102: Honor java sources when running compileScoverageScala
Thanks for fixing this, one small caveate is that default dependencies in gradle goes like scala -> java -> kotlin (if code exists). So we might need to consider kotlin at some point too. Testing this. Will update soon. |
test is working fine. However we do also have integration tests which is defined as:
and this fails with:
|
I had a similar issue that get solved after removing scala-style plugin dependency from the project. This plugin only works with Scala 2.11 and it seems that latest Scoverage plugin only works with Scala 2.12 |
I'm looking at the 2.11 issue under #94 Sorry, |
I'm having a very similar if not the same issue. |
…ard compatibility with Scala 2.11
This shouldn't be a problem for a mixed java/scala project, as these projects should be configured in such a way where the Take a look at my mixed Java / Scala multi-module gradle example project (I'm planning to write a guide for it, as it is not all that self-explanatory), and especially note how the source sets are configured in the apply plugin: 'scala'
// A way to make Java code able to import Scala code (doesn't work by default)
ext.configureSources = { set, name ->
set.scala.srcDir("src/$name/java")
set.java.srcDirs = []
}
configureSources(sourceSets.main, 'main')
configureSources(sourceSets.test, 'test') |
When scala code references java code and scoverage is used with gradle, I get compilation errors in scala where the java classes are referenced.
this is because in ScoveragePlugin.groovy, we dont copy over java files from the sourceset when creating
instrumentedSourceSet
(Might be better to copy whole sourceset if possible:workaround for now is to add following to build.gradle:
The text was updated successfully, but these errors were encountered: