-
Notifications
You must be signed in to change notification settings - Fork 41
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
Unable to find org.scoverage.ScoverageReport #13
Comments
From my own investigation, the gradle plugin is looking for |
I see the same issue with gradle 1.12 as well. |
Seems maiflai addressed this issue in commit 6686446 yesterday. For the time being, until a new version is released, adding the following to your gradle build file solves this problem too: reportScoverage {
dependencies {
scoverage 'org.scoverage:gradle-scoverage:0.6-SNAPSHOT'
}
} |
Release 1.0 has now been published to maven central - please note that this requires you to update to scoverage 1.0.1. Please could you let me know if this issue can be closed? Thanks, |
I just tested with gradle-scoverage 1.0.6 and scoverage 1.0.1 and 1.0.2. But the error is still there. I guess I misinterpreted what 6686446 was meant to do. Note, that I also tried Release 1.0 as you suggested, but it seems that was build with java 8 and I only have jdk 7. Looking at
The discussion here (http://forums.gradle.org/gradle/topics/share_classpath_between_buildscript_and_project_configuration) seems to suggest that accessing the classpath configuration of the buildscript is not possible. |
Hi - thanks for reporting back - we've since released 1.0.6 which supports jdk 7, but I agree that I can reproduce an error here. It appears to work correctly with a simple project, but please could I check that you have a multi-module project? It would also be helpful if you could share your build configuration. I agree with your workaround (as listed above) in the meantime. An alternative is to 'accidentally' configure the buildscript in your subprojects - perhaps you have a code-free parent project? Thanks again, |
Yes, I do have a multi-module project, but my parent project does have code. And btw, I'm using Gradle 2.2.1. In my rootProject I'm using
where the scoverage.gradle file contains the code from the "Gettting started" section of README.md. When I include the code directly in my build.gradle file, it works fine. Is this a limitation of Gradle's apply mechanism, or a feature? |
That's interesting - are you applying this to |
I'm only configuring scoverage for the root project, the single subproject is not configured for scoverage yet. When I try to do it for all projects: // root project
allprojects {
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/groups/public" }
}
dependencies {
classpath 'org.scoverage:gradle-scoverage:1.0.6'
}
}
apply plugin: org.scoverage.ScoveragePlugin
} I get this error:
Which is OK, since the buildscripts have already been processed when the allprojects call is seen in the second phase of Gradle's build evaluation. Then, I tried: // root project
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/groups/public" }
}
dependencies {
classpath 'org.scoverage:gradle-scoverage:1.0.6'
}
}
allprojects {
apply plugin: org.scoverage.ScoveragePlugin
dependencies {
scoverage 'org.scoverage:scalac-scoverage-plugin_2.11:1.0.2', 'org.scoverage:scalac-scoverage-runtime_2.11:1.0.2'
}
} Which yields this error in the subproject again:
|
Just looked through the gradle forums and I found this discussion: http://forums.gradle.org/gradle/topics/understanding_the_additivity_of_the_buildscript_dependencies
So, the second script I posted above is the way to go, too bad it doesn't work for the subprojects. \edit: Here's another piece of the puzzle: http://forums.gradle.org/gradle/topics/how_to_refer_to_classes_on_the_buildscript_classpath_in_an_applied_script
|
I've published version 1.0.8, which I hope addresses this issue. Please could you upgrade and remove the workaround (if you used one) to test it? |
Yes, works for me without having any workaround code in my build. Thanks! |
Hi,
With the configuration displayed in the README.md file at the root of the project, gradle says that it is unable to find or load the main class
org.scoverage.ScoverageReport
. By launching gradle with--debug
option, it says:So gradle-scoverage does not appear in the classpath. But I don't how to do it? Any idea?
I'm using gradle 2.0.
regards
The text was updated successfully, but these errors were encountered: