diff options
author | Jakob Odersky <jakob@odersky.com> | 2018-04-29 18:00:04 -0700 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2018-04-29 18:00:04 -0700 |
commit | 5c7faea2052344c1186a14b15269017d4b676aab (patch) | |
tree | bc507272457a32aa707e1f6782c2926f3aee160b /build.sbt | |
parent | eef44a276ace54ef0b215c1c4b045afde40daf5b (diff) | |
download | commando-5c7faea2052344c1186a14b15269017d4b676aab.tar.gz commando-5c7faea2052344c1186a14b15269017d4b676aab.tar.bz2 commando-5c7faea2052344c1186a14b15269017d4b676aab.zip |
Build for ScalaJS and Scala Native
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 36 |
1 files changed, 31 insertions, 5 deletions
@@ -1,6 +1,32 @@ -scalaVersion := "2.12.5" +// shadow sbt-scalajs' crossProject and CrossType until Scala.js 1.0.0 is released +import sbtcrossproject.{crossProject, CrossType} -libraryDependencies ++= Seq( - "com.lihaoyi" %% "utest" % "0.6.3" % "test" -) -testFrameworks += new TestFramework("utest.runner.Framework") +lazy val commando = crossProject(JSPlatform, JVMPlatform, NativePlatform) + .withoutSuffixFor(JVMPlatform) + .crossType(CrossType.Pure) + .in(file(".")) + .settings( + scalacOptions ++= Seq( + "-deprecation", + "-feature" + ), + libraryDependencies ++= Seq( + "com.lihaoyi" %%% "utest" % "0.6.3" % "test" + ), + testFrameworks += new TestFramework("utest.runner.Framework"), + scalaVersion := crossScalaVersions.value.head + ) + .jsSettings( + crossScalaVersions := "2.11.12" :: Nil + ) + .jvmSettings( + crossScalaVersions := "2.12.5" :: "2.11.12" :: Nil + ) + .nativeSettings( + crossScalaVersions := "2.11.12" :: Nil, + nativeLinkStubs := true + ) + +lazy val commandoJS = commando.js +lazy val commandoJVM = commando.jvm +lazy val commandoNative = commando.native |