We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ea0f26f commit f7b0b8dCopy full SHA for f7b0b8d
src/main/scala/ScalaModulePlugin.scala
@@ -57,9 +57,8 @@ object ScalaModulePlugin extends AutoPlugin {
57
* Enable `-opt:l:classpath` or `-optimize`, depending on the scala version.
58
*/
59
lazy val enableOptimizer: Setting[_] = scalacOptions in (Compile, compile) += {
60
- val ScalaMaj = """2\.(\d+)\..*""".r
61
- val ScalaMaj(scalaMaj) = scalaVersion.value
62
- if (scalaMaj.toInt >= 12) "-opt:l:classpath" else "-optimize"
+ val Some((2, maj)) = CrossVersion.partialVersion(scalaVersion.value)
+ if (maj >= 12) "-opt:l:classpath" else "-optimize"
63
}
64
65
/**
0 commit comments