Closed maslovalex closed 3 years ago
Same here, this prevents using latest scala versions due to https://github.com/scoverage/scalac-scoverage-plugin/issues/305
Sorry - does this really prevent the use of the latest scala versions?
It's less convenient than before, but you should be able to set
scoverage {
scoverageVersion = '1.4.4'
scoverageScalaVersion = '2.12.13'
}
I think this is required because the publishing of the upstream compiler plugin has changed.
@maiflai your snippet will not work I think because as of version 1.4.3, the scoverage scala plugin is published against full scala versions only (2.12.12, 2.12.13, etc) and no shorter binary versions (2.12, 2.13) anymore. See https://mvnrepository.com/artifact/org.scoverage/scalac-scoverage-plugin .
It seems to work for me.
Perhaps you could provide a reproduction of the issue?
I think that should work (as I mentioned it my 1st message).
It will not work if you omit setting scoverageScalaVersion
and expect plugin to set it based on the scala-library
version from dependencies.
Thanks for confirming.
Unfortunately what looked like a trivial fix isn't working quite as expected.
I'd prefer to concentrate on the --parallel
issue rather than this as it appears to have a valid workaround.
Alright I'm probably wrong. I'll check if I can come up with a repro or if the issue is on my build. Thanks!
back here :) I'm currently trying with
{
scoverageVersion = '1.4.8'
scoverageScalaVersion = '2.12.14'
}
scoverage-plugin seems to be published with full scala version whereas scoverage-runtime with binary version only. So setting scoverageScalaVersion to 2.12 (resp. 2.12.14) will fail to resolve scoverage-plugin (resp. scoverage-runtime)
scalac-scoverage-plugin
andscalac-scoverage-runtime
from version1.4.2
publish artifacts with specific scala version suffix.see https://search.maven.org/search?q=scalac-scoverage-runtime
ATM, it is possible to use by setting scoverageScalaVersion like this.
But in case
scoverageScalaVersion
resolved from thescala-library
dependency only major part is taken:https://github.com/scoverage/gradle-scoverage/blob/f92c9424ad8b02e13dcbfc790c8995c51fd1b308/src/main/groovy/org/scoverage/ScoveragePlugin.groovy#L364
https://github.com/scoverage/gradle-scoverage/blob/f92c9424ad8b02e13dcbfc790c8995c51fd1b308/src/main/groovy/org/scoverage/ScoveragePlugin.groovy#L70