aboutsummaryrefslogtreecommitdiff
path: root/project/Build.scala
blob: c2eaabe4deaa16732790933638b741d4946f1733 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
import sbt._
import sbt.Keys._
import util._
import play._
import play.PlayImport.PlayKeys._
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._

import com.github.jodersky.mavlink.sbt._
import com.github.jodersky.mavlink.sbt.MavlinkKeys._

object ApplicationBuild extends Build {

  //settings common to all projects
  val common = Seq(
    scalaVersion := "2.11.6",
    scalacOptions ++= Seq("-feature", "-deprecation"),
    mavlinkDialect := (baseDirectory in ThisBuild).value / "mavlink" / "concise.xml"
  )

  lazy val root = Project("root", file(".")).aggregate(
    main,
    uav,
    dashboard
  )

  lazy val main = (
    Project("vfd-main", file("vfd-main"))
    enablePlugins(PlayScala)
    enablePlugins(SbtMavlink)
    settings(common: _*)
    settings(
      resolvers += Resolver.url("scala-js-releases", url("http://dl.bintray.com/content/scala-js/scala-js-releases"))(Resolver.ivyStylePatterns),
      libraryDependencies ++= Seq(
        "org.webjars" % "bootstrap" % "3.3.1",
        "org.webjars" % "font-awesome" % "4.2.0",
        "org.webjars" % "jquery" % "2.1.3"
      )
    )
    dependsOn(uav)
    dependsOnJs(dashboard)
  )

  lazy val uav = (
    Project("vfd-uav", file("vfd-uav"))
    enablePlugins(SbtMavlink)
    settings(common: _*)
    settings(
      libraryDependencies ++= Seq(
        "com.typesafe.akka" %% "akka-actor" % "2.3.9",
        "com.github.jodersky" %% "flow" % "2.1.0",
        "com.github.jodersky" % "flow-native" % "2.1.0"
      )
    )
  )

  lazy val dashboard = (
    Project("vfd-dashboard", file("vfd-dashboard"))
    enablePlugins(ScalaJSPlugin)
    enablePlugins(SbtMavlink)
    settings(common: _*)
    settings(
      libraryDependencies ++= Seq(
        "org.scala-js" %%% "scalajs-dom" % "0.8.0",
        "com.lihaoyi" %%% "scalatags" % "0.4.6",
        "com.lihaoyi" %%% "scalarx" % "0.2.8"
      )
    )
  )

}