forked from lagom/lagom-java-chirper-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
118 lines (99 loc) · 3.69 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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
organization in ThisBuild := "com.lightbend.lagom.sample.chirper"
// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := "2.11.8"
// SCALA SUPPORT: Remove the line below
EclipseKeys.projectFlavor in Global := EclipseProjectFlavor.Java
lazy val friendApi = project("friend-api")
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies += lagomJavadslApi
)
lazy val friendImpl = project("friend-impl")
.enablePlugins(LagomJava)
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies ++= Seq(
lagomJavadslPersistenceCassandra,
lagomJavadslTestKit
)
)
.settings(lagomForkedTestSettings: _*)
.dependsOn(friendApi)
lazy val chirpApi = project("chirp-api")
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies ++= Seq(
lagomJavadslApi,
lagomJavadslJackson
)
)
lazy val chirpImpl = project("chirp-impl")
.enablePlugins(LagomJava)
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies ++= Seq(
lagomJavadslPersistenceCassandra,
lagomJavadslPubSub,
lagomJavadslTestKit
)
)
.settings(lagomForkedTestSettings: _*)
.dependsOn(chirpApi)
lazy val activityStreamApi = project("activity-stream-api")
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies += lagomJavadslApi
)
.dependsOn(chirpApi)
lazy val activityStreamImpl = project("activity-stream-impl")
.enablePlugins(LagomJava)
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies += lagomJavadslTestKit
)
.dependsOn(activityStreamApi, chirpApi, friendApi)
lazy val frontEnd = project("front-end")
.enablePlugins(PlayJava, LagomPlay)
.disablePlugins(PlayLayoutPlugin)
.settings(
version := "1.0-SNAPSHOT",
routesGenerator := InjectedRoutesGenerator,
libraryDependencies ++= Seq(
"org.webjars" % "react" % "0.14.8",
"org.webjars" % "react-router" % "1.0.3",
"org.webjars" % "jquery" % "2.2.4",
"org.webjars" % "foundation" % "5.5.2",
"org.webjars" %% "webjars-play" % "2.5.0",
lagomJavadslClient
),
ReactJsKeys.sourceMapInline := true,
// Remove to use Scala IDE
EclipseKeys.createSrc := EclipseCreateSrc.ValueSet(EclipseCreateSrc.ManagedClasses, EclipseCreateSrc.ManagedResources),
sourceDirectory in Assets := baseDirectory.value / "src" / "main" / "resources" / "assets",
resourceDirectory in Assets := baseDirectory.value / "src" / "main" / "resources" / "public",
PlayKeys.playMonitoredFiles ++=
(sourceDirectories in (Compile, TwirlKeys.compileTemplates)).value :+
(sourceDirectory in Assets).value :+
(resourceDirectory in Assets).value
)
lazy val loadTestApi = project("load-test-api")
.settings(
version := "1.0-SNAPSHOT",
libraryDependencies += lagomJavadslApi
)
lazy val loadTestImpl = project("load-test-impl")
.enablePlugins(LagomJava)
.settings(version := "1.0-SNAPSHOT")
.dependsOn(loadTestApi, friendApi, activityStreamApi, chirpApi)
def project(id: String) = Project(id, base = file(id))
.settings(javacOptions in compile ++= Seq("-encoding", "UTF-8", "-source", "1.8", "-target", "1.8", "-Xlint:unchecked", "-Xlint:deprecation"))
.settings(jacksonParameterNamesJavacSettings: _*) // applying it to every project even if not strictly needed.
// See https://github.com/FasterXML/jackson-module-parameter-names
lazy val jacksonParameterNamesJavacSettings = Seq(
javacOptions in compile += "-parameters"
)
// do not delete database files on start
lagomCassandraCleanOnStart in ThisBuild := false
// Kafka can be disabled until we need it
lagomKafkaEnabled in ThisBuild := false
licenses in ThisBuild := Seq("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0"))