Skip to content

Commit

Permalink
added cross compile for scalajs 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mliarakos committed Apr 3, 2020
1 parent d5de344 commit b9f9828
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
5 changes: 4 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ lazy val commonSettings = scalaSettings ++ publishSettings ++ Seq(

lazy val commonJsSettings = Seq(
jsEnv := new org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv(),
scalacOptions += "-P:scalajs:sjsDefinedByDefault"
scalacOptions ++= {
if (scalaJSVersion.startsWith("0.6.")) Seq("-P:scalajs:sjsDefinedByDefault")
else Nil
}
)

lazy val lagomVersion = settingKey[String]("The Lagom version to use.")
Expand Down
9 changes: 7 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
val scalaJSVersion = Option(System.getenv("SCALAJS_VERSION")).getOrElse("0.6.32")

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.32")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.1")
addSbtPlugin("org.akka-js" % "sbt-shocon" % "0.5.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.0")

libraryDependencies ++= Seq(
"org.eclipse.jgit" % "org.eclipse.jgit.pgm" % "3.7.1.201504261725-r"
)
) ++ {
if (scalaJSVersion.startsWith("0.6.")) Nil
else Seq("org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.0.0")
}

0 comments on commit b9f9828

Please sign in to comment.