This repository has been archived by the owner on Jul 24, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sbt
82 lines (69 loc) · 2.79 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
import com.lightbend.lagom.core.LagomVersion
import com.typesafe.sbt.packager.docker.{ DockerAlias, DockerPermissionStrategy }
organization in ThisBuild := "com.example"
version in ThisBuild := "1.7-SNAPSHOT"
// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := "2.12.8"
val macwire = "com.softwaremill.macwire" %% "macros" % "2.3.0" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.4" % Test
val lagomScaladslAkkaDiscovery = "com.lightbend.lagom" %% "lagom-scaladsl-akka-discovery-service-locator" % LagomVersion.current
lazy val `lagom-scala-openshift-smoketests` = (project in file("."))
.settings(headerSettings)
.settings(disableDockerPublish)
.aggregate(`hello-api`, `hello-impl`, `hello-proxy-api`, `hello-proxy-impl`)
lazy val `hello-api` = (project in file("hello-api"))
.settings(headerSettings)
.settings(disableDockerPublish)
.settings(
libraryDependencies += lagomScaladslApi,
)
lazy val `hello-impl` = (project in file("hello-impl"))
.enablePlugins(LagomScala)
.settings(headerSettings)
.settings(dockerSettings("hello-lagom"))
.settings(
libraryDependencies ++= Seq(
"com.lightbend.akka.discovery" %% "akka-discovery-kubernetes-api" % "1.0.0",
lagomScaladslPubSub,
macwire,
scalaTest
)
).settings(lagomForkedTestSettings: _*)
.dependsOn(`hello-api`)
lazy val `hello-proxy-api` = (project in file("hello-proxy-api"))
.settings(headerSettings)
.settings(disableDockerPublish)
.settings(
libraryDependencies += lagomScaladslApi,
)
lazy val `hello-proxy-impl` = (project in file("hello-proxy-impl"))
.enablePlugins(LagomScala)
.settings(headerSettings)
.settings(dockerSettings("hello-proxy-lagom"))
.settings(
libraryDependencies ++= Seq(
lagomScaladslAkkaDiscovery,
lagomScaladslTestKit,
macwire,
scalaTest
)
)
.dependsOn(`hello-proxy-api`, `hello-api`)
// This sample application doesn't need either Kafka or Cassandra so we disable them
// to make the devMode startup faster.
lagomCassandraEnabled in ThisBuild := false
lagomKafkaEnabled in ThisBuild := false
def headerSettings: Seq[Setting[_]] = Seq(
headerLicense := Some(HeaderLicense.Custom("Copyright (C) 2019 Lightbend Inc. <https://www.lightbend.com>")),
licenses := Seq(("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0.html")))
)
def disableDockerPublish: Seq[Setting[_]] = Seq(
publish in Docker := {},
)
def dockerSettings(name: String): Seq[Setting[_]] = Seq(
dockerAliases in Docker += DockerAlias(None, None, name, None),
packageName in Docker := name,
dockerPermissionStrategy := DockerPermissionStrategy.Run,
dockerBaseImage := "adoptopenjdk/openjdk8",
)
ThisBuild / scalacOptions ++= List("-encoding", "utf8", "-deprecation", "-feature", "-unchecked")