Skip to content

Commit 98c8e2a

Browse files
committed
Cross compile scala3-runtime on Scala 3 LTS & Next
1 parent e7780f5 commit 98c8e2a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

build.sc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ object runner extends Cross[Runner](Scala.runnerScalaVersions)
9999
object `test-runner` extends Cross[TestRunner](Scala.testRunnerScalaVersions)
100100
object `tasty-lib` extends Cross[TastyLib](Scala.all)
101101
// Runtime classes used within native image on Scala 3 replacing runtime from Scala
102-
object `scala3-runtime` extends Scala3Runtime
102+
object `scala3-runtime` extends Cross[Scala3Runtime](Scala.allScala3)
103103
// Logic to process classes that is shared between build and the scala-cli itself
104104
object `scala3-graal` extends Cross[Scala3Graal](Scala.mainVersions)
105105
// Main app used to process classpath within build itself
@@ -605,9 +605,9 @@ trait Options extends ScalaCliCrossSbtModule with ScalaCliPublishModule with Has
605605
}
606606
}
607607

608-
trait Scala3Runtime extends SbtModule with ScalaCliPublishModule {
609-
def ivyDeps = super.ivyDeps()
610-
def scalaVersion = Scala.defaultInternal
608+
trait Scala3Runtime extends CrossSbtModule with ScalaCliPublishModule {
609+
def crossScalaVersion = crossValue
610+
def ivyDeps = super.ivyDeps()
611611
}
612612

613613
trait Scala3Graal extends ScalaCliCrossSbtModule
@@ -623,7 +623,7 @@ trait Scala3Graal extends ScalaCliCrossSbtModule
623623
// scala3RuntimeFixes.jar is also used within
624624
// resource-config.json and BytecodeProcessor.scala
625625
os.copy.over(
626-
`scala3-runtime`.jar().path,
626+
`scala3-runtime`(crossScalaVersion).jar().path,
627627
extraResourceDir / "scala3RuntimeFixes.jar",
628628
createFolders = true
629629
)

0 commit comments

Comments
 (0)