|
| 1 | +import sbt.Resolver |
| 2 | + |
| 3 | +import Common._ |
| 4 | +import app.softnetwork.sbt.build._ |
| 5 | + |
| 6 | +///////////////////////////////// |
| 7 | +// Defaults |
| 8 | +///////////////////////////////// |
| 9 | + |
| 10 | +app.softnetwork.sbt.build.Publication.settings |
| 11 | + |
| 12 | +///////////////////////////////// |
| 13 | +// Useful aliases |
| 14 | +///////////////////////////////// |
| 15 | + |
| 16 | +addCommandAlias("cd", "project") // navigate the projects |
| 17 | + |
| 18 | +addCommandAlias("cc", ";clean;compile") // clean and compile |
| 19 | + |
| 20 | +addCommandAlias("pl", ";clean;publishLocal") // clean and publish locally |
| 21 | + |
| 22 | +addCommandAlias("pr", ";clean;publish") // clean and publish globally |
| 23 | + |
| 24 | +addCommandAlias("pld", ";clean;local:publishLocal;dockerComposeUp") // clean and publish/launch the docker environment |
| 25 | + |
| 26 | +addCommandAlias("dct", ";dockerComposeTest") // navigate the projects |
| 27 | + |
| 28 | +ThisBuild / shellPrompt := prompt |
| 29 | + |
| 30 | +ThisBuild / organization := "app.softnetwork" |
| 31 | + |
| 32 | +name := "session" |
| 33 | + |
| 34 | +ThisBuild / version := "0.1.0" |
| 35 | + |
| 36 | +ThisBuild / scalaVersion := "2.12.15" |
| 37 | + |
| 38 | +ThisBuild / scalacOptions ++= Seq("-deprecation", "-feature", "-target:jvm-1.8") |
| 39 | + |
| 40 | +ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint") |
| 41 | + |
| 42 | +ThisBuild / resolvers ++= Seq( |
| 43 | + "Softnetwork Server" at "https://softnetwork.jfrog.io/artifactory/releases/", |
| 44 | + "Maven Central Server" at "https://repo1.maven.org/maven2", |
| 45 | + "Typesafe Server" at "https://repo.typesafe.com/typesafe/releases" |
| 46 | +) |
| 47 | + |
| 48 | +ThisBuild / versionScheme := Some("early-semver") |
| 49 | + |
| 50 | +val scalatest = Seq( |
| 51 | + "org.scalatest" %% "scalatest" % Versions.scalatest % Test |
| 52 | +) |
| 53 | + |
| 54 | +ThisBuild / libraryDependencies ++= Seq( |
| 55 | + "com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion % "protobuf", |
| 56 | + "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.1" |
| 57 | +) ++ scalatest |
| 58 | + |
| 59 | +Test / parallelExecution := false |
| 60 | + |
| 61 | +lazy val common = project.in(file("common")) |
| 62 | + .configs(IntegrationTest) |
| 63 | + .settings(Defaults.itSettings) |
| 64 | + .enablePlugins(AkkaGrpcPlugin) |
| 65 | + |
| 66 | +lazy val core = project.in(file("core")) |
| 67 | + .configs(IntegrationTest) |
| 68 | + .settings(Defaults.itSettings, BuildInfoSettings.settings) |
| 69 | + .enablePlugins(BuildInfoPlugin) |
| 70 | + .dependsOn( |
| 71 | + common % "compile->compile;test->test;it->it" |
| 72 | + ) |
| 73 | + |
| 74 | +lazy val testkit = project.in(file("testkit")) |
| 75 | + .configs(IntegrationTest) |
| 76 | + .settings(Defaults.itSettings) |
| 77 | + .enablePlugins(BuildInfoPlugin) |
| 78 | + .dependsOn( |
| 79 | + core % "compile->compile;test->test;it->it" |
| 80 | + ) |
| 81 | + |
| 82 | +lazy val root = project.in(file(".")) |
| 83 | + .aggregate(common, core, testkit) |
| 84 | + .configs(IntegrationTest) |
| 85 | + .settings(Defaults.itSettings) |
0 commit comments