Created
September 28, 2016 21:35
-
-
Save iamthiago/fa122a6be3d2aaa4b296a5242823bd60 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name := "project" | |
| scalaVersion in ThisBuild := "2.11.8" | |
| lazy val commonSettings = Seq( | |
| organization := "com.mycompany", | |
| version := "0.0.1", | |
| test in assembly := {}, | |
| parallelExecution in Test := false | |
| ) | |
| resolvers in ThisBuild ++= Seq( | |
| Resolver.sonatypeRepo("releases"), | |
| Resolver.sonatypeRepo("snapshots"), | |
| Resolver.bintrayRepo("websudos", "oss-releases"), | |
| Resolver.jcenterRepo, | |
| "spray repo" at "http://repo.spray.io", | |
| "Typesafe repository snapshots" at "http://repo.typesafe.com/typesafe/snapshots/", | |
| "Typesafe repository releases" at "http://repo.typesafe.com/typesafe/releases/", | |
| "Eclipse Repository" at "https://repo.eclipse.org/content/repositories/paho-releases/", | |
| "Java.net Maven2 Repository" at "http://download.java.net/maven/2/", | |
| "Twitter Repository" at "http://maven.twttr.com" | |
| ) | |
| lazy val mergeStrategy = Seq( | |
| assemblyMergeStrategy in assembly := { | |
| case PathList("javax", "servlet", xs@_*) => MergeStrategy.first | |
| case PathList("META-INF", "io.netty.versions.properties") => MergeStrategy.last | |
| case PathList(ps@_*) if ps.last endsWith ".html" => MergeStrategy.first | |
| case "application.conf" => MergeStrategy.concat | |
| case "reference.conf" => MergeStrategy.concat | |
| case m if m.toLowerCase.endsWith("manifest.mf") => MergeStrategy.discard | |
| case m if m.toLowerCase.matches("meta-inf.*\\.sf$") => MergeStrategy.discard | |
| case _ => MergeStrategy.first | |
| } | |
| ) | |
| val akkaV = "2.4.5" | |
| val phantomV = "1.22.0" | |
| val json4sV = "3.2.11" | |
| val sprayV = "1.3.3" | |
| val jacksonV = "2.4.4" | |
| val kamonV = "0.5.2" | |
| lazy val commonDependencies = Seq( | |
| "com.typesafe" % "config" % "1.3.0", | |
| "ch.qos.logback" % "logback-classic" % "1.1.3", | |
| "ch.qos.logback" % "logback-core" % "1.1.3", | |
| "net.logstash.logback" % "logstash-logback-encoder" % "4.3", | |
| "org.slf4j" % "slf4j-api" % "1.7.12", | |
| "joda-time" % "joda-time" % "2.8", | |
| "org.scalatest" %% "scalatest" % "2.2.4" % "test", | |
| "org.specs2" %% "specs2-core" % "2.3.13" % "test", | |
| "org.scala-lang" % "scala-reflect" % "2.11.8", | |
| "de.mycompany.libs" % "wt-libs-beutils" % "[1.4,2)" exclude("com.exasol", "jdbc") | |
| ) | |
| lazy val akkaDependencies = Seq( | |
| "com.typesafe.akka" %% "akka-actor" % akkaV, | |
| "com.typesafe.akka" %% "akka-cluster" % akkaV, | |
| "com.typesafe.akka" %% "akka-remote" % akkaV, | |
| "com.typesafe.akka" %% "akka-contrib" % akkaV, | |
| "com.typesafe.akka" %% "akka-stream" % akkaV, | |
| "com.typesafe.akka" %% "akka-http-core" % akkaV, | |
| "com.typesafe.akka" %% "akka-http-experimental" % akkaV, | |
| "com.typesafe.akka" %% "akka-slf4j" % akkaV, | |
| "com.typesafe.akka" %% "akka-testkit" % akkaV, | |
| "com.typesafe.akka" %% "akka-stream-testkit" % akkaV | |
| ) | |
| lazy val sprayDependencies = Seq( | |
| "io.spray" %% "spray-can" % sprayV, | |
| "io.spray" %% "spray-client" % sprayV, | |
| "io.spray" %% "spray-http" % sprayV, | |
| "io.spray" %% "spray-util" % sprayV, | |
| "io.spray" %% "spray-caching" % sprayV, | |
| "io.spray" %% "spray-routing-shapeless2" % sprayV, | |
| "io.spray" %% "spray-httpx" % sprayV, | |
| "io.spray" %% "spray-testkit" % sprayV | |
| ) | |
| lazy val jsonDependencies = Seq( | |
| "org.json4s" %% "json4s-jackson" % json4sV, | |
| "org.json4s" %% "json4s-ext" % json4sV, | |
| "com.fasterxml.jackson.core" % "jackson-core" % jacksonV, | |
| "com.fasterxml.jackson.core" % "jackson-databind" % jacksonV, | |
| "com.fasterxml.jackson.module" % "jackson-module-scala_2.11" % jacksonV | |
| ) | |
| lazy val phantomDependencies = Seq( | |
| "com.websudos" %% "phantom-dsl" % phantomV, | |
| "com.websudos" %% "phantom-connectors" % phantomV, | |
| "com.websudos" %% "phantom-reactivestreams" % phantomV, | |
| "com.typesafe.play" %% "play-streams-experimental" % "2.4.6" | |
| ) | |
| lazy val mongoDependencies = Seq( | |
| "org.reactivemongo" %% "reactivemongo" % "0.11.10", | |
| "org.reactivemongo" %% "reactivemongo-akkastreams" % "0.11.10-SNAPSHOT", | |
| "org.mongodb.scala" %% "mongo-scala-driver" % "1.0.1" | |
| ) | |
| lazy val kamonDependencies = Seq( | |
| "io.kamon" %% "kamon-core" % kamonV, | |
| "io.kamon" %% "kamon-akka" % kamonV, | |
| "io.kamon" %% "kamon-datadog" % kamonV, | |
| // "io.kamon" %% "kamon-log-reporter" % kamonV, | |
| "com.monsanto.arch" %% "spray-kamon-metrics" % "0.1.2", | |
| "org.aspectj" % "aspectjweaver" % "1.8.7" | |
| ) | |
| lazy val kafkaDependencies = Seq( | |
| "org.apache.kafka" %% "kafka" % "0.8.2.2" exclude("org.slf4j", "slf4j-log4j12") | |
| ) | |
| lazy val gatlingDependencies = Seq( | |
| "io.gatling.highcharts" % "gatling-charts-highcharts" % "2.2.0" % "test", | |
| "io.gatling" % "gatling-test-framework" % "2.2.0" % "test" | |
| ) | |
| lazy val buildNumber = sys.env.getOrElse("BUILD_NUMBER", "000") | |
| lazy val cdbServerConfig = Seq( | |
| organization := "com.mycompany", | |
| version := s"0.0.1-$buildNumber", | |
| test in assembly := {}, | |
| mainClass in assembly := Some("com.mycompany.cdb.server.Boot"), | |
| javaOptions in run += "-javaagent:" + System.getProperty("user.home") + "/.ivy2/cache/org.aspectj/aspectjweaver/jars/aspectjweaver-1.8.7.jar", | |
| parallelExecution in Test := false | |
| ) | |
| lazy val streamConfig = Seq( | |
| organization := "com.mycompany", | |
| version := "0.0.1", | |
| test in assembly := {}, | |
| mainClass in assembly := Some("com.mycompany.cdb.stream.Boot") | |
| ) | |
| lazy val root = Project( | |
| id = "root", | |
| base = file(".") | |
| ) aggregate(macros, common, cassandra, cdbServer, stream, gatling) | |
| lazy val cdbServer = (project in file("cdb-server")) | |
| .settings(cdbServerConfig: _*) | |
| .settings(mergeStrategy: _*) | |
| .settings(libraryDependencies ++= (commonDependencies ++ akkaDependencies ++ sprayDependencies ++ jsonDependencies ++ kamonDependencies ++ mongoDependencies ++ kafkaDependencies)) | |
| .dependsOn(cassandra) | |
| lazy val cassandra = (project in file("cassandra")) | |
| .settings(commonSettings: _*) | |
| .settings(libraryDependencies ++= (commonDependencies ++ phantomDependencies)) | |
| .dependsOn(common) | |
| lazy val common = (project in file("common")) | |
| .settings(commonSettings: _*) | |
| .settings(libraryDependencies ++= commonDependencies) | |
| .dependsOn(macros) | |
| lazy val macros = (project in file("macros")) | |
| .settings(commonSettings: _*) | |
| .settings(libraryDependencies ++= commonDependencies) | |
| lazy val stream = (project in file("stream")) | |
| .settings(streamConfig: _*) | |
| .settings(mergeStrategy: _*) | |
| .settings(libraryDependencies ++= (akkaDependencies ++ jsonDependencies ++ mongoDependencies)) | |
| .dependsOn(cassandra) | |
| lazy val gatling = (project in file("gatling")) | |
| .enablePlugins(GatlingPlugin) | |
| .settings(libraryDependencies ++= gatlingDependencies) | |
| .dependsOn(cassandra) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment