aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Odersky <jodersky@gmail.com>2015-12-22 14:52:11 +0100
committerJakob Odersky <jodersky@gmail.com>2015-12-22 14:52:11 +0100
commitc77bf21e7f4c197d34d23b2aebe5953a75d099e2 (patch)
treed115e09e2ba599eb491d961b3409dce11936b49e
parent58daf3b0559d4facbb09fcc375a0b3d4ff9010cf (diff)
downloadmavigator-c77bf21e7f4c197d34d23b2aebe5953a75d099e2.tar.gz
mavigator-c77bf21e7f4c197d34d23b2aebe5953a75d099e2.tar.bz2
mavigator-c77bf21e7f4c197d34d23b2aebe5953a75d099e2.zip
Update versions and build confuguration
-rw-r--r--build.sbt2
-rw-r--r--project/Build.scala129
-rw-r--r--project/ScalaJS.scala16
-rw-r--r--project/VfdBuild.scala60
-rw-r--r--project/build.properties2
-rw-r--r--project/plugins.sbt12
-rw-r--r--vfd-bindings/build.sbt8
-rw-r--r--vfd-dashboard/build.sbt8
-rw-r--r--vfd-index/build.sbt8
-rw-r--r--vfd-main/build.sbt12
-rw-r--r--vfd-uav/build.sbt9
11 files changed, 130 insertions, 136 deletions
diff --git a/build.sbt b/build.sbt
new file mode 100644
index 0000000..0941ea1
--- /dev/null
+++ b/build.sbt
@@ -0,0 +1,2 @@
+//goto main project on load
+onLoad in Global := (Command.process("project vfd-main", _: State)) compose (onLoad in Global).value
diff --git a/project/Build.scala b/project/Build.scala
deleted file mode 100644
index be570b2..0000000
--- a/project/Build.scala
+++ /dev/null
@@ -1,129 +0,0 @@
-import sbt._
-import sbt.Keys._
-import sbt.Project.projectToRef
-
-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._
-
-import playscalajs.ScalaJSPlay
-import playscalajs.PlayScalaJS.autoImport._
-import com.typesafe.sbt.web.Import._
-
-import sbtunidoc.Plugin._
-
-import com.typesafe.sbt.SbtSite._
-import com.typesafe.sbt.SbtGhPages._
-import com.typesafe.sbt.SbtGit._
-
-object ApplicationBuild extends Build {
-
- // settings common to all projects
- val commonSettings = Seq(
- scalaVersion := "2.11.6",
- scalacOptions ++= Seq("-feature", "-deprecation")
- )
-
- // root super-project
- lazy val root = (
- Project("root", file("."))
- settings(commonSettings: _*)
- settings(unidocSettings: _*)
- settings(site.settings: _*)
- settings(ghpages.settings: _*)
- settings(
- //goto main project on load
- onLoad in Global := (Command.process("project vfd-main", _: State)) compose (onLoad in Global).value,
- site.addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), "latest/api"),
- git.remoteRepo := "git@github.com:jodersky/vfd.git"
- )
- aggregate(
- bindings,
- main,
- uav,
- dashboard,
- index
- )
- )
-
- // empty project that uses SbtMavlink to generate protocol bindings
- lazy val bindings = (
- Project("vfd-bindings", file("vfd-bindings"))
- enablePlugins(SbtMavlink)
- enablePlugins(ScalaJSPlugin)
- settings(commonSettings: _*)
- settings(
- mavlinkDialect := baseDirectory.value / "mavlink" / "common.xml"
- )
- )
-
- // main play project
- lazy val main = (
- Project("vfd-main", file("vfd-main"))
- enablePlugins(PlayScala)
- dependsOn(bindings)
- dependsOn(uav)
- settings(commonSettings: _*)
- settings(
- scalaJSProjects := Seq(dashboard, index),
- pipelineStages := Seq(scalaJSProd),
- libraryDependencies ++= Seq(
- "org.webjars" % "bootstrap" % "3.3.4",
- "org.webjars" % "font-awesome" % "4.3.0"
- )
- )
- aggregate(
- projectToRef(dashboard),
- projectToRef(index)
- )
- )
-
- // communication backend
- lazy val uav = (
- Project("vfd-uav", file("vfd-uav"))
- dependsOn(bindings)
- settings(commonSettings: _*)
- settings(
- libraryDependencies ++= Seq(
- "com.typesafe.akka" %% "akka-actor" % "2.3.10",
- "com.github.jodersky" %% "flow" % "2.1.1",
- "com.github.jodersky" % "flow-native" % "2.1.1"
- )
- )
- )
-
- // web frontends
- val scalajsSettings = Seq(
- libraryDependencies ++= Seq(
- "org.scala-js" %%% "scalajs-dom" % "0.8.0",
- "com.lihaoyi" %%% "scalatags" % "0.5.2",
- "com.lihaoyi" %%% "scalarx" % "0.2.8"
- )
- )
-
- // main cockpit front-end
- lazy val dashboard = (
- Project("vfd-dashboard", file("vfd-dashboard"))
- enablePlugins(ScalaJSPlugin)
- enablePlugins(ScalaJSPlay)
- dependsOn(bindings)
- settings(commonSettings: _*)
- settings(scalajsSettings: _*)
- )
-
- // landing page providing selection of drone
- lazy val index = (
- Project("vfd-index", file("vfd-index"))
- enablePlugins(ScalaJSPlugin)
- enablePlugins(ScalaJSPlay)
- dependsOn(bindings)
- settings(commonSettings: _*)
- settings(scalajsSettings: _*)
- )
-
-}
diff --git a/project/ScalaJS.scala b/project/ScalaJS.scala
new file mode 100644
index 0000000..49f23ad
--- /dev/null
+++ b/project/ScalaJS.scala
@@ -0,0 +1,16 @@
+package vfd
+
+import sbt.Keys._
+import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
+
+object ScalaJS {
+
+ val settings = Seq(
+ libraryDependencies ++= Seq(
+ "org.scala-js" %%% "scalajs-dom" % "0.8.0",
+ "com.lihaoyi" %%% "scalatags" % "0.5.2",
+ "com.lihaoyi" %%% "scalarx" % "0.2.8"
+ )
+ )
+
+}
diff --git a/project/VfdBuild.scala b/project/VfdBuild.scala
new file mode 100644
index 0000000..a80d62c
--- /dev/null
+++ b/project/VfdBuild.scala
@@ -0,0 +1,60 @@
+package vfd
+
+import sbt._
+import sbt.Keys._
+import sbt.Project.projectToRef
+
+object VfdBuild extends Build {
+
+ // settings common to all projects
+ val defaultSettings = Seq(
+ scalaVersion := "2.11.7",
+ scalacOptions ++= Seq("-feature", "-deprecation")
+ )
+
+ // root super-project
+ lazy val root = Project(
+ id = "root",
+ base = file("."),
+ aggregate = Seq(bindings, main, uav, dashboard, index)
+ )
+
+ // empty project that uses SbtMavlink to generate protocol bindings
+ lazy val bindings = Project(
+ id = "vfd-bindings",
+ base = file("vfd-bindings")
+ )
+
+ // main play project
+ lazy val main = Project(
+ id = "vfd-main",
+ base = file("vfd-main"),
+ dependencies = Seq(bindings, uav),
+ aggregate = Seq(
+ projectToRef(dashboard),
+ projectToRef(index)
+ )
+ )
+
+ // communication backend
+ lazy val uav = Project(
+ id = "vfd-uav",
+ base = file("vfd-uav"),
+ dependencies = Seq(bindings)
+ )
+
+ // main cockpit front-end
+ lazy val dashboard = Project(
+ id = "vfd-dashboard",
+ base = file("vfd-dashboard"),
+ dependencies = Seq(bindings)
+ )
+
+ // landing page providing selection of drone
+ lazy val index = Project(
+ id = "vfd-index",
+ base = file("vfd-index"),
+ dependencies = Seq(bindings)
+ )
+
+}
diff --git a/project/build.properties b/project/build.properties
index a6e117b..817bc38 100644
--- a/project/build.properties
+++ b/project/build.properties
@@ -1 +1 @@
-sbt.version=0.13.8
+sbt.version=0.13.9
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 06a9a7b..71b5073 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -12,16 +12,16 @@ resolvers += "jgit-repo" at "http://download.eclipse.org/jgit/maven"
*/
// play web framework
-addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.9")
+addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.4.6")
// add support for scalajs
-addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.2")
+addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.5")
// enable "smooth" dependencies between play and scalajs projects
addSbtPlugin("com.vmunier" % "sbt-play-scalajs" % "0.2.3")
// generate MAVLink protocol bindings
-addSbtPlugin("com.github.jodersky" % "sbt-mavlink" % "0.5.1")
+addSbtPlugin("com.github.jodersky" % "sbt-mavlink" % "0.5.2")
/*
@@ -29,10 +29,10 @@ addSbtPlugin("com.github.jodersky" % "sbt-mavlink" % "0.5.1")
*/
// automate publishing documentation
-addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")
+//addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.2")
// publish to github pages
-addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.3")
+//addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.5.4")
// generate documentation for all projects
-addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2")
+//addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.3")
diff --git a/vfd-bindings/build.sbt b/vfd-bindings/build.sbt
new file mode 100644
index 0000000..d5870e1
--- /dev/null
+++ b/vfd-bindings/build.sbt
@@ -0,0 +1,8 @@
+import vfd.VfdBuild
+
+enablePlugins(SbtMavlink)
+enablePlugins(ScalaJSPlugin)
+
+VfdBuild.defaultSettings
+
+mavlinkDialect := baseDirectory.value / "mavlink" / "common.xml"
diff --git a/vfd-dashboard/build.sbt b/vfd-dashboard/build.sbt
new file mode 100644
index 0000000..31b502d
--- /dev/null
+++ b/vfd-dashboard/build.sbt
@@ -0,0 +1,8 @@
+import vfd.{ScalaJS, VfdBuild}
+
+enablePlugins(ScalaJSPlugin)
+enablePlugins(ScalaJSPlay)
+
+VfdBuild.defaultSettings
+
+ScalaJS.settings
diff --git a/vfd-index/build.sbt b/vfd-index/build.sbt
new file mode 100644
index 0000000..31b502d
--- /dev/null
+++ b/vfd-index/build.sbt
@@ -0,0 +1,8 @@
+import vfd.{ScalaJS, VfdBuild}
+
+enablePlugins(ScalaJSPlugin)
+enablePlugins(ScalaJSPlay)
+
+VfdBuild.defaultSettings
+
+ScalaJS.settings
diff --git a/vfd-main/build.sbt b/vfd-main/build.sbt
new file mode 100644
index 0000000..4357a93
--- /dev/null
+++ b/vfd-main/build.sbt
@@ -0,0 +1,12 @@
+import vfd.VfdBuild
+
+enablePlugins(PlayScala)
+
+VfdBuild.defaultSettings
+
+scalaJSProjects := Seq(dashboard, index)
+pipelineStages := Seq(scalaJSProd)
+libraryDependencies ++= Seq(
+ "org.webjars" % "bootstrap" % "3.3.4",
+ "org.webjars" % "font-awesome" % "4.3.0"
+)
diff --git a/vfd-uav/build.sbt b/vfd-uav/build.sbt
new file mode 100644
index 0000000..40d2182
--- /dev/null
+++ b/vfd-uav/build.sbt
@@ -0,0 +1,9 @@
+import vfd.VfdBuild
+
+VfdBuild.defaultSettings
+
+libraryDependencies ++= Seq(
+ "com.typesafe.akka" %% "akka-actor" % "2.3.10",
+ "com.github.jodersky" %% "flow" % "2.1.1",
+ "com.github.jodersky" % "flow-native" % "2.1.1"
+)