File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
modules/options/src/main/scala/scala/build/options Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -115,11 +115,19 @@ final case class ScalaNativeOptions(
115
115
def platformSuffix : String =
116
116
" native" + ScalaVersion .nativeBinary(finalVersion).getOrElse(finalVersion)
117
117
118
- def nativeDependencies (scalaVersion : String ): Seq [AnyDependency ] =
118
+ def nativeDependencies (scalaVersion : String ): Seq [AnyDependency ] = {
119
+ // https://github.com/scala-native/scala-native/pull/3326
120
+ val scalalibVersion =
121
+ if (finalVersion.startsWith(" 0.4." )) finalVersion
122
+ else s " $scalaVersion+ $finalVersion"
123
+ // Since 0.5.x Scala Native requires explicit dependency on javalib
124
+ // See https://github.com/scala-native/scala-native/pull/3566
125
+ val javalib = dep " org.scala-native::javalib:: $finalVersion"
119
126
if (scalaVersion.startsWith(" 2." ))
120
- Seq (dep " org.scala-native::scalalib:: $finalVersion " )
127
+ Seq (dep " org.scala-native::scalalib:: $scalalibVersion " , javalib )
121
128
else
122
- Seq (dep " org.scala-native::scala3lib:: $finalVersion" )
129
+ Seq (dep " org.scala-native::scala3lib:: $scalalibVersion" , javalib)
130
+ }
123
131
124
132
def compilerPlugins : Seq [AnyDependency ] =
125
133
Seq (dep " org.scala-native:::nscplugin: $finalVersion" )
You can’t perform that action at this time.
0 commit comments