@@ -27,7 +27,7 @@ object ScoverageCompiler {
27
27
s.Yposdebug .value = true
28
28
s.classpath.value = classPath.mkString(File .pathSeparator)
29
29
30
- val path = s " ./scalac-scoverage-plugin/target/scala- $ShortScalaVersion /test-generated-classes "
30
+ val path = s " ./scalac-scoverage-plugin/target/scala- $ScalaVersion /test-generated-classes "
31
31
new File (path).mkdirs()
32
32
s.d.value = path
33
33
s
@@ -49,13 +49,13 @@ object ScoverageCompiler {
49
49
}
50
50
51
51
private def sbtCompileDir : File = {
52
- val dir = new File (s " ./scalac-scoverage-plugin/target/scala- $ShortScalaVersion /classes " )
52
+ val dir = new File (s " ./scalac-scoverage-plugin/target/scala- $ScalaVersion /classes " )
53
53
if (! dir.exists)
54
54
throw new FileNotFoundException (s " Could not locate SBT compile directory for plugin files [ $dir] " )
55
55
dir
56
56
}
57
57
58
- private def runtimeClasses : File = new File (s " ./scalac-scoverage-runtime/jvm/target/scala- $ShortScalaVersion /classes " )
58
+ private def runtimeClasses : File = new File (s " ./scalac-scoverage-runtime/jvm/target/scala- $ScalaVersion /classes " )
59
59
60
60
private def findScalaJar (artifactId : String ): File =
61
61
findIvyJar(" org.scala-lang" , artifactId, ScalaVersion )
@@ -66,9 +66,11 @@ object ScoverageCompiler {
66
66
67
67
private def findCoursierJar (artifactId : String , version : String ): Option [File ] = {
68
68
val userHome = System .getProperty(" user.home" )
69
- val jarPath = s " $userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar "
70
- val file = new File (jarPath)
71
- if (file.exists()) Some (file) else None
69
+ val jarPaths = Seq (
70
+ s " $userHome/.cache/coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar " ,
71
+ s " $userHome/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/ $artifactId/ $version/ $artifactId- $version.jar " ,
72
+ )
73
+ jarPaths.map(new File (_)).filter(_.exists()).headOption
72
74
}
73
75
74
76
private def findIvyJar (groupId : String , artifactId : String , version : String , packaging : String = " jar" ): Option [File ] = {
0 commit comments