aboutsummaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorJakob Odersky <jakob@inpher.io>2019-10-09 17:10:43 -0400
committerJakob Odersky <jakob@inpher.io>2019-10-09 20:33:16 -0400
commit0ceee5ed4bae240b8c8e94d2fd7424d9d0b67ec7 (patch)
tree2df0258f81050e6fed51d38e217c4f6256518e12 /build.sbt
parentfaed28c54900fc0b359700873367095f51425794 (diff)
downloadscala-triad-0ceee5ed4bae240b8c8e94d2fd7424d9d0b67ec7.tar.gz
scala-triad-0ceee5ed4bae240b8c8e94d2fd7424d9d0b67ec7.tar.bz2
scala-triad-0ceee5ed4bae240b8c8e94d2fd7424d9d0b67ec7.zip
Migrate build to mill
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt113
1 files changed, 0 insertions, 113 deletions
diff --git a/build.sbt b/build.sbt
deleted file mode 100644
index fb199b5..0000000
--- a/build.sbt
+++ /dev/null
@@ -1,113 +0,0 @@
-// shadow sbt-scalajs' crossProject and CrossType until Scala.js 1.0.0 is released
-
-import sbtcrossproject.{crossProject, CrossType}
-import scalajscrossproject.ScalaJSCrossPlugin.autoImport.{
- toScalaJSGroupID => _,
- _
-}
-
-scalaVersion in ThisBuild := "2.12.6"
-version in ThisBuild := {
- import sys.process._
- ("git describe --always --dirty=-SNAPSHOT --match v[0-9].*" !!).tail.trim
-}
-scalacOptions in ThisBuild ++= Seq(
- "-feature",
- "-language:_",
- "-unchecked",
- "-deprecation",
- "-Xlint",
- "-encoding",
- "utf8"
-)
-
-lazy val common = crossProject(JVMPlatform, JSPlatform, NativePlatform)
- .crossType(CrossType.Full)
- .settings(
- testFrameworks += new TestFramework("utest.runner.Framework"),
- libraryDependencies ++= Seq(
- "xyz.driver" %%% "spray-json-derivation" % "0.4.3",
- "com.lihaoyi" %%% "scalatags" % "0.6.7",
- "com.lihaoyi" %%% "utest" % "0.6.3" % "test"
- ),
- sourceGenerators in Compile += Def.task {
- val file = (sourceManaged in Compile).value / "scala" / "BuildInfo.scala"
- val content =
- s"""package triad
- |object BuildInfo {
- | final val Version: String = "${version.value}"
- |}
- |""".stripMargin
- IO.write(file, content)
- Seq(file)
- }
- )
- .jsSettings(
- libraryDependencies ++= Seq(
- "org.scala-js" %%% "scalajs-dom" % "0.9.2",
- "org.scala-js" %%% "scalajs-java-time" % "0.2.4"
- )
- )
- .nativeSettings(
- scalaVersion := "2.11.12",
- nativeLinkStubs := true,
- libraryDependencies ++= Seq(
- "io.crashbox" %%% "commando" % "0.1.2"
- ),
- sourceGenerators in Compile += Def.task {
- import sys.process._
- val file = (sourceManaged in Compile).value / "scala" / "NativeBuildInfo.scala"
- val content =
- s"""package triad
- |object NativeBuildInfo {
- | final val Platform: String =
- | "${("uname -s" !!).trim}/${("uname -m" !!).trim}"
- | final val NativeVersion: String = "${nativeVersion}"
- |}
- |""".stripMargin
- IO.write(file, content)
- Seq(file)
- }
- )
-
-lazy val commonJS = common.js
-lazy val commonJVM = common.jvm
-lazy val commonNative = common.native
-
-lazy val server = project
- .settings(
- libraryDependencies ++= Seq(
- "com.typesafe.akka" %% "akka-stream" % "2.5.11",
- "com.typesafe.akka" %% "akka-http" % "10.1.0",
- "com.typesafe.akka" %% "akka-http-spray-json" % "10.1.0",
- "com.typesafe.slick" %% "slick" % "3.2.3",
- "org.slf4j" % "slf4j-nop" % "1.6.4",
- "org.xerial" % "sqlite-jdbc" % "3.21.0.1"
- )
- )
- .dependsOn(commonJVM)
- .settings(Js.dependsOnJs(ui))
-
-lazy val ui = project
- .enablePlugins(ScalaJSPlugin)
- .disablePlugins(RevolverPlugin)
- .dependsOn(commonJS)
-
-lazy val client = project
- .enablePlugins(ScalaNativePlugin)
- .settings(
- scalaVersion := "2.11.12",
- nativeMode := "debug",
- name := "triad"
- )
- .dependsOn(commonNative)
-
-lazy val root = (project in file("."))
- .aggregate(commonJS, commonJVM, commonNative, client, ui, server)
- .settings(
- publish := {},
- publishLocal := {}
- )
-
-addCommandAlias("start", "reStart")
-addCommandAlias("stop", "reStop")