@@ -72,6 +72,7 @@ object Dependencies {
72
72
def scalaJsSbtTestAdapter1 = ivy " org.scala-js::scalajs-sbt-test-adapter: $scalaJs1Version"
73
73
def scalaJsLogging1 = ivy " org.scala-js::scalajs-logging:1.1.1 "
74
74
def scalaNativeTools04 = ivy " org.scala-native::tools:0.4.17 "
75
+ def scalaNativeTools04 = ivy " org.scala-native::tools:0.5.0-RC2 "
75
76
def scalazCore = ivy " org.scalaz::scalaz-core:7.3.8 "
76
77
def snailgun = ivy " io.github.alexarchambault.scala-cli.snailgun::snailgun-core:0.4.1-sc2 "
77
78
def sourcecode = ivy " com.lihaoyi::sourcecode:0.3.1 "
@@ -401,6 +402,7 @@ class Frontend(val crossScalaVersion: String) extends BloopCrossSbtModule with B
401
402
| def zincVersion = " ${Dependencies .zinc.dep.version}"
402
403
| def snailgunVersion = "0.4.1-sc2"
403
404
| def nativeBridge04 = " ${bridges.`scala-native-04`().artifactId()}"
405
+ | def nativeBridge05 = " ${bridges.`scala-native-05`().artifactId()}"
404
406
| def jsBridge1 = " ${bridges.`scalajs-1`().artifactId()}"
405
407
|}
406
408
| """ .stripMargin
@@ -538,15 +540,16 @@ object bridges extends Module {
538
540
}
539
541
}
540
542
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 )
543
546
extends BloopCrossSbtModule
544
547
with BloopPublish {
545
- def artifactName = " bloop-native-bridge-0-4 "
548
+ def artifactName = s " bloop-native-bridge-0- $nativeMajorVersion "
546
549
547
550
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 "
550
553
originalSources.map {
551
554
case pathRef if pathRef.path.startsWith(millSourcePath) =>
552
555
PathRef (updatedSourcePath / pathRef.path.relativeTo(millSourcePath))
@@ -563,9 +566,10 @@ object bridges extends Module {
563
566
shared(),
564
567
backend()
565
568
)
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
+ }
569
573
570
574
object test extends Tests {
571
575
def sources = T .sources(updateSources(super .sources()))
0 commit comments