diff --git a/build.sbt b/build.sbt index 9a0cff33..ea4e960e 100644 --- a/build.sbt +++ b/build.sbt @@ -48,7 +48,7 @@ lazy val twirl = project --- (baseDirectory.value / "docs" ** "*")).get ++ (baseDirectory.value / "project" ** "*.scala" --- (baseDirectory.value ** "target" ** "*")).get ) - .aggregate(apiJvm, apiJs, parser, compiler, plugin, mavenPlugin) + .aggregate(apiJvm, apiJs, apiNative, parser, compiler, plugin, mavenPlugin) lazy val nodeJs = { if (System.getProperty("NODE_PATH") != null) @@ -57,7 +57,7 @@ lazy val nodeJs = { new NodeJSEnv() } -lazy val api = crossProject(JVMPlatform, JSPlatform) +lazy val api = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("api")) .enablePlugins(Common, Playdoc, Omnidoc) .configs(Docs) @@ -78,9 +78,14 @@ lazy val api = crossProject(JVMPlatform, JSPlatform) libraryDependencies += "org.scala-lang.modules" %%% "scala-xml" % "2.4.0", libraryDependencies += "org.scalatest" %%% "scalatest" % ScalaTestVersion % Test, ) + .nativeSettings( + // Scala Native cannot run forked tests + Test / fork := false + ) -lazy val apiJvm = api.jvm -lazy val apiJs = api.js +lazy val apiJvm = api.jvm +lazy val apiJs = api.js +lazy val apiNative = api.native lazy val parser = project .in(file("parser")) diff --git a/project/plugins.sbt b/project/plugins.sbt index 6e8566f8..e9107016 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -6,6 +6,9 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.11.1") addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.19.0") addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") +addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.8") +addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.3.2") + addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.4") addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.10.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5")