-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.sbt
80 lines (73 loc) · 3.01 KB
/
build.sbt
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
72
73
74
75
76
77
78
79
80
import Common._
/**
* Helper for defining a new non-Play sub-project
*
* @param projectName Name of the project
* @param baseFile Where the base of the project is, defaults to a directory from root named the same as projectName
*/
def nonPlayProject(projectName: String)(baseFile: String = projectName): Project = {
Project(
id = projectName,
base = file(baseFile),
settings = nonPlayAppSettings
).settings(name := projectName).settings(Scalariform.settings)
}
// -------------------------------------------------------
// Play app
// -------------------------------------------------------
lazy val app = Project(id = "octoparts", base = file("."), settings = playAppSettings)
.enablePlugins(PlayScala)
.dependsOn(models, authHandlerApi, playJsonFormats, scalaWsClient % "test->compile")
/*
* The "test->compile" above adds a test-mode dependency in the current project definition (root app in this
* case); in particular the ScalaWsClient project is to be in a compiled state before running tests in root.
*
* The reason I added this was to allow us to integration test the root project (Octoparts app)
* using the ScalaWsClient.
*
* For more info see: http://www.scala-sbt.org/0.13/docs/Multi-Project.html#Per-configuration+classpath+dependencies
*/
.aggregate(scalaWsClient, javaClient, models, authHandlerApi, playJsonFormats)
// -------------------------------------------------------
// Interface for authentication handling
// -------------------------------------------------------
lazy val authHandlerApi = nonPlayProject("auth-handler-api")("auth-handler-api")
.settings(
name := "octoparts-auth-handler-api",
libraryDependencies ++= Dependencies.authHandlerDependencies
)
// -------------------------------------------------------
// Model classes
// -------------------------------------------------------
lazy val models = nonPlayProject("models")()
.settings(
name := "octoparts-models",
libraryDependencies ++= Dependencies.modelsDependencies
)
// -------------------------------------------------------
// Java client
// -------------------------------------------------------
lazy val javaClient = nonPlayProject("java-client")()
.settings(
name := "octoparts-java-client",
libraryDependencies ++= Dependencies.javaClientDependncies
)
.dependsOn(models)
// -------------------------------------------------------
// Play-JSON-formats
// -------------------------------------------------------
lazy val playJsonFormats = nonPlayProject("play-json-formats")()
.settings(
name := "octoparts-play-json-formats",
libraryDependencies ++= Dependencies.playJsonFormatsDependencies
)
.dependsOn(models)
// -------------------------------------------------------
// Scala-WS-client
// -------------------------------------------------------
lazy val scalaWsClient = nonPlayProject("scala-ws-client")()
.settings(
name := "octoparts-scala-ws-client",
libraryDependencies ++= Dependencies.scalaWsClientDependencies
)
.dependsOn(models, playJsonFormats)