Skip to content

Commit

Permalink
Add scala-native support
Browse files Browse the repository at this point in the history
  • Loading branch information
lorandszakacs committed Jan 31, 2024
1 parent d1ff338 commit 59202a0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
12 changes: 8 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,23 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

# unreleased

Cross publish to Scala Native!

### Scala versions:

- `2.12.18`, JVM and JS
- `2.13.12`, JVM and JS
- `3.3.1`, JVM and JS
- `2.12.18`, JVM, JS, Native
- `2.13.12`, JVM, JS, Native
- `3.3.1`, JVM, JS, Native

### internals:
- bump sbt-scalajs to `1.15.0`
- bump sbt-scalafmt to `2.5.2`
- bump scalafmt to `3.7.17`
- bump sbt to `1.9.8`
- bump munit to `1.0.0-M10`
- bump sbt-typelevel tp `0.6.5`
- bump sbt-typelevel to `0.6.5`
- introduce sbt-scala-native `0.4.17`
- introduce sbt-scala-native-crossproject `1.3.2`

# 1.0.0

Expand Down
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ val munitVersion = "1.0.0-M10" // https://github.com/scalameta/munit/r

lazy val root = tlCrossRootProject.aggregate(enclosure)

lazy val enclosure = crossProject(JVMPlatform, JSPlatform)
lazy val enclosure = crossProject(JVMPlatform, JSPlatform, NativePlatform)
.crossType(CrossType.Full)
.in(file("enclosure"))
.settings(
Expand All @@ -75,6 +75,9 @@ lazy val enclosure = crossProject(JVMPlatform, JSPlatform)
)
.settings(macroSettings)
.settings(scala3Flags)
.nativeSettings(
tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.1.0").toMap
)

lazy val macroSettings = Seq(
libraryDependencies ++= {
Expand Down
8 changes: 5 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
// format: off
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") // https://github.com/scalameta/sbt-scalafmt/releases
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0") // https://github.com/scala-js/scala-js/releases/
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.5") // https://github.com/typelevel/sbt-typelevel/releases
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") // https://github.com/scalameta/sbt-scalafmt/releases
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0") // https://github.com/scala-js/scala-js/releases/
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.17") // https://github.com/scala-native/scala-native/releases
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") // https://github.com/portable-scala/sbt-crossproject/releases
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.6.5") // https://github.com/typelevel/sbt-typelevel/releases

0 comments on commit 59202a0

Please sign in to comment.