From 8a4ebe76200a2e570bd959d8780c3c0a0bf71d5c Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Fri, 31 Mar 2017 16:38:49 -0700 Subject: Initial commit --- .gitignore | 1 + build.sbt | 18 ++++++++++++++++++ project/Dependencies.scala | 23 +++++++++++++++++++++++ project/GitVersionPlugin.scala | 19 +++++++++++++++++++ project/build.properties | 1 + project/plugins.sbt | 5 +++++ 6 files changed, 67 insertions(+) create mode 100644 .gitignore create mode 100644 build.sbt create mode 100644 project/Dependencies.scala create mode 100644 project/GitVersionPlugin.scala create mode 100644 project/build.properties create mode 100644 project/plugins.sbt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9f97022 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +target/ \ No newline at end of file diff --git a/build.sbt b/build.sbt new file mode 100644 index 0000000..b0931e4 --- /dev/null +++ b/build.sbt @@ -0,0 +1,18 @@ +name := "crashbox" + +//TODO: update scala version after +//https://github.com/scala-ide/scala-refactoring/issues/180 is fixed +crossScalaVersions in ThisBuild := List("2.12.0") +scalaVersion in ThisBuild := (crossScalaVersions in ThisBuild).value.head +scalacOptions in ThisBuild ++= Seq( + "-deprecation", + "-feature", + //"-Xfatal-warnings", + "-Xlint" +) +fork in ThisBuild := true +cancelable in Global := true + +lazy val root = (project in file(".")).aggregate(server) + +lazy val server = (project in file("crashboxd")) diff --git a/project/Dependencies.scala b/project/Dependencies.scala new file mode 100644 index 0000000..6038711 --- /dev/null +++ b/project/Dependencies.scala @@ -0,0 +1,23 @@ +package crashbox + +import sbt._ + +object Dependencies { + + val akkaActor = "com.typesafe.akka" %% "akka-actor" % "2.4.17" + val akkaHttp = "com.typesafe.akka" %% "akka-http" % "10.0.4" + val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % "10.0.4" + val akkaHttpSpray = "com.typesafe.akka" %% "akka-http-spray-json" % "10.0.0" + val akkaStream = "com.typesafe.akka" %% "akka-stream" % "2.4.17" + + val jgitServer = "org.eclipse.jgit" % "org.eclipse.jgit.http.server" % "4.6.0.201612231935-r" + val jgitArchive = "org.eclipse.jgit" % "org.eclipse.jgit.archive" % "4.6.0.201612231935-r" + + val dockerClient = "com.spotify" % "docker-client" % "8.1.1" + + val slick = "com.typesafe.slick" %% "slick" % "3.2.0" + //"com.typesafe.slick" %% "slick-hikaricp" % "3.2.0" + + val scalatest = "org.scalatest" %% "scalatest" % "3.0.1" + +} diff --git a/project/GitVersionPlugin.scala b/project/GitVersionPlugin.scala new file mode 100644 index 0000000..3f2d88e --- /dev/null +++ b/project/GitVersionPlugin.scala @@ -0,0 +1,19 @@ +package crashbox + +import scala.language.postfixOps +import sbt._ +import sbt.Keys._ + +object GitVersionPlugin extends AutoPlugin { + + override def requires = plugins.CorePlugin + override def trigger = allRequirements + + override def projectSettings = Seq( + version := ( + "git describe --always --dirty=-SNAPSHOT --match v[0-9].*" #|| + "echo v0.0.0-SNAPSHOT" !! + ).tail.trim + ) + +} diff --git a/project/build.properties b/project/build.properties new file mode 100644 index 0000000..5f32afe --- /dev/null +++ b/project/build.properties @@ -0,0 +1 @@ +sbt.version=0.13.13 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt new file mode 100644 index 0000000..c0f528d --- /dev/null +++ b/project/plugins.sbt @@ -0,0 +1,5 @@ +// add ~re-start task +addSbtPlugin("io.spray" % "sbt-revolver" % "0.8.0") + +// format source code +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.5.6") -- cgit v1.2.3