@@ -72,6 +72,7 @@ object Dependencies {
7272 def scalaJsSbtTestAdapter1 = ivy " org.scala-js::scalajs-sbt-test-adapter: $scalaJs1Version"
7373 def scalaJsLogging1 = ivy " org.scala-js::scalajs-logging:1.1.1 "
7474 def scalaNativeTools04 = ivy " org.scala-native::tools:0.4.17 "
75+ def scalaNativeTools04 = ivy " org.scala-native::tools:0.5.0-RC2 "
7576 def scalazCore = ivy " org.scalaz::scalaz-core:7.3.8 "
7677 def snailgun = ivy " io.github.alexarchambault.scala-cli.snailgun::snailgun-core:0.4.1-sc2 "
7778 def sourcecode = ivy " com.lihaoyi::sourcecode:0.3.1 "
@@ -401,6 +402,7 @@ class Frontend(val crossScalaVersion: String) extends BloopCrossSbtModule with B
401402 | def zincVersion = " ${Dependencies .zinc.dep.version}"
402403 | def snailgunVersion = "0.4.1-sc2"
403404 | def nativeBridge04 = " ${bridges.`scala-native-04`().artifactId()}"
405+ | def nativeBridge05 = " ${bridges.`scala-native-05`().artifactId()}"
404406 | def jsBridge1 = " ${bridges.`scalajs-1`().artifactId()}"
405407 |}
406408 | """ .stripMargin
@@ -538,15 +540,16 @@ object bridges extends Module {
538540 }
539541 }
540542
541- object `scala-native-04` extends Cross [ScalaNative04 ](Dependencies .scalaVersions: _* )
542- class ScalaNative04 (val crossScalaVersion : String )
543+ object `scala-native-04` extends Cross [ScalaNative ](4 , Dependencies .scalaVersions: _* )
544+ object `scala-native-05` extends Cross [ScalaNative ](5 , Dependencies .scalaVersions: _* )
545+ class ScalaNative (nativeMajorVersion : Int , val crossScalaVersion : String )
543546 extends BloopCrossSbtModule
544547 with BloopPublish {
545- def artifactName = " bloop-native-bridge-0-4 "
548+ def artifactName = s " bloop-native-bridge-0- $nativeMajorVersion "
546549
547550 private def updateSources (originalSources : Seq [PathRef ]): Seq [PathRef ] =
548- if (millSourcePath.endsWith(os.rel / " scala-native-04 " )) {
549- val updatedSourcePath = millSourcePath / os.up / " scala-native-0.4 "
551+ if (millSourcePath.endsWith(os.rel / s " scala-native-0 $nativeMajorVersion " )) {
552+ val updatedSourcePath = millSourcePath / os.up / s " scala-native-0. $nativeMajorVersion "
550553 originalSources.map {
551554 case pathRef if pathRef.path.startsWith(millSourcePath) =>
552555 PathRef (updatedSourcePath / pathRef.path.relativeTo(millSourcePath))
@@ -563,9 +566,10 @@ object bridges extends Module {
563566 shared(),
564567 backend()
565568 )
566- def compileIvyDeps = super .compileIvyDeps() ++ Agg (
567- Dependencies .scalaNativeTools04
568- )
569+ def compileIvyDeps = super .compileIvyDeps() ++ Agg {
570+ if (nativeMajorVersion == 4 ) Dependencies .scalaNativeTools04
571+ else Dependencies .scalaNativeTools05
572+ }
569573
570574 object test extends Tests {
571575 def sources = T .sources(updateSources(super .sources()))
0 commit comments