Skip to content

Commit

Permalink
Add support for Scala Native 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gabro committed Jan 20, 2021
1 parent e32667f commit fb84b52
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 15 deletions.
8 changes: 6 additions & 2 deletions bin/test-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ coursier resolve \
org.scalameta:munit_3.0.0-M2:$version \
org.scalameta:munit_3.0.0-M3:$version \
org.scalameta:munit_0.27:$version \
org.scalameta:munit_native0.4.0-M2_2.11:$version \
org.scalameta:munit_native0.4.0_2.11:$version \
org.scalameta:munit_native0.4.0_2.12:$version \
org.scalameta:munit_native0.4.0_2.13:$version \
org.scalameta:munit_sjs1_2.11:$version \
org.scalameta:munit_sjs1_2.12:$version \
org.scalameta:munit_sjs1_2.13:$version \
Expand All @@ -22,7 +24,9 @@ coursier resolve \
org.scalameta:munit-scalacheck_0.27:$version \
org.scalameta:munit-scalacheck_3.0.0-M2:$version \
org.scalameta:munit-scalacheck_3.0.0-M3:$version \
org.scalameta:munit-scalacheck_native0.4.0-M2_2.11:$version \
org.scalameta:munit-scalacheck_native0.4.0_2.11:$version \
org.scalameta:munit-scalacheck_native0.4.0_2.12:$version \
org.scalameta:munit-scalacheck_native0.4.0_2.13:$version \
org.scalameta:munit-scalacheck_sjs1_2.11:$version \
org.scalameta:munit-scalacheck_sjs1_2.12:$version \
org.scalameta:munit-scalacheck_sjs1_2.13:$version \
Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import sbtcrossproject.CrossPlugin.autoImport.crossProject
import sbtcrossproject.CrossPlugin.autoImport.CrossType
import scala.collection.mutable
val scalaJSVersion = "1.4.0"
val scalaNativeVersion = "0.4.0-M2"
val scalaNativeVersion = "0.4.0"
def previousVersion = "0.7.0"
def scala213 = "2.13.4"
def scala212 = "2.12.13"
Expand Down Expand Up @@ -116,8 +116,7 @@ val sharedJSConfigure: Project => Project =
_.disablePlugins(MimaPlugin)
val sharedNativeSettings: List[Def.Setting[_]] = List(
skipIdeaSettings,
scalaVersion := scala211,
crossScalaVersions := List(scala211)
crossScalaVersions := scala2Versions
)
val sharedNativeConfigure: Project => Project =
_.disablePlugins(ScalafixPlugin, MimaPlugin)
Expand Down
19 changes: 10 additions & 9 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ object test extends Tests {

### Scala.js setup

Additionally, if you are using Scala.js you will need to export your tests as CommonJS modules:
Additionally, if you are using Scala.js you will need to export your tests as
CommonJS modules:

**sbt:**

Expand All @@ -58,18 +59,18 @@ Test / scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }
```scala
object test extends Tests {
...

override def moduleKind = T(mill.scalajslib.api.ModuleKind.CommonJSModule)
}
```

| Scala Version | JVM | Scala.js (0.6.x) | Scala.js (1.x) | Native (0.4.x) |
| ------------------------- | :-: | :--------------: | :------------: | :------------: |
| 2.11.x || ✅ until 0.7.16 | ||
| 2.12.x || ✅ until 0.7.16 | | n/a |
| 2.13.x || ✅ until 0.7.16 | | n/a |
| @SCALA3_PREVIOUS_VERSION@ || n/a | | n/a |
| @SCALA3_STABLE_VERSION@ || n/a | | n/a |
| Scala Version | JVM | Scala.js (0.6.x) | Scala.js (1.x) | Native (0.4.x) |
| ------------------------- | :-: | :--------------: | :------------: | :------------: |
| 2.11.x || ✅ until 0.7.16 |||
| 2.12.x || ✅ until 0.7.16 || |
| 2.13.x || ✅ until 0.7.16 || |
| @SCALA3_PREVIOUS_VERSION@ || n/a || n/a |
| @SCALA3_STABLE_VERSION@ || n/a || n/a |

Next, write a test suite.

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.4.6")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.0.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0-M2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.4.0")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.8.1")

Expand Down

0 comments on commit fb84b52

Please sign in to comment.