This repository has been archived by the owner on May 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
build.sbt
85 lines (72 loc) · 2.54 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
import com.lightbend.lagom.core.LagomVersion
organization in ThisBuild := "com.example"
// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := "2.12.8"
// Update the version generated by sbt-dynver to remove any + characters, since these are illegal in docker tags
version in ThisBuild ~= (_.replace('+', '-'))
dynver in ThisBuild ~= (_.replace('+', '-'))
lazy val `shopping-cart-java` = (project in file("."))
.aggregate(`shopping-cart-api`, `shopping-cart`, `inventory-api`, inventory)
lazy val `shopping-cart-api` = (project in file("shopping-cart-api"))
.settings(common)
.settings(
libraryDependencies ++= Seq(
lagomJavadslApi,
lombok
)
)
lazy val `shopping-cart` = (project in file("shopping-cart"))
.enablePlugins(LagomJava)
.settings(common)
.settings(dockerSettings)
.settings(
libraryDependencies ++= Seq(
lagomJavadslPersistenceJdbc,
lagomJavadslKafkaBroker,
lagomLogback,
lagomJavadslTestKit,
lombok,
postgresDriver,
hamcrestLibrary,
lagomJavadslAkkaDiscovery,
akkaDiscoveryKubernetesApi
)
)
.settings(lagomForkedTestSettings: _*)
.dependsOn(`shopping-cart-api`)
lazy val `inventory-api` = (project in file("inventory-api"))
.settings(common)
.settings(
libraryDependencies ++= Seq(
lagomJavadslApi
)
)
lazy val inventory = (project in file("inventory"))
.enablePlugins(LagomJava)
.settings(common)
.settings(dockerSettings)
.settings(
libraryDependencies ++= Seq(
lagomJavadslKafkaClient,
lagomLogback,
lagomJavadslTestKit,
lagomJavadslAkkaDiscovery
)
)
.dependsOn(`shopping-cart-api`, `inventory-api`)
val lombok = "org.projectlombok" % "lombok" % "1.18.6"
val postgresDriver = "org.postgresql" % "postgresql" % "42.2.5"
val hamcrestLibrary = "org.hamcrest" % "hamcrest-library" % "2.1" % Test
val akkaManagementVersion = "1.0.0"
val akkaDiscoveryKubernetesApi = "com.lightbend.akka.discovery" %% "akka-discovery-kubernetes-api" % akkaManagementVersion
val lagomJavadslAkkaDiscovery = "com.lightbend.lagom" %% "lagom-javadsl-akka-discovery-service-locator" % LagomVersion.current
def common = Seq(
javacOptions in (Compile,compile) ++= Seq("-Xlint:unchecked", "-Xlint:deprecation", "-parameters", "-Werror")
)
def dockerSettings = Seq(
dockerUpdateLatest := true,
dockerBaseImage := "adoptopenjdk/openjdk8",
dockerUsername := sys.props.get("docker.username"),
dockerRepository := sys.props.get("docker.registry")
)
lagomCassandraEnabled in ThisBuild := false