This repository has been archived by the owner on Dec 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
45 lines (40 loc) · 1.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
import play.grpc.gen.scaladsl.PlayScalaServerCodeGenerator
enablePlugins(DockerComposePlugin)
dockerImageCreationTask := (Docker / publishLocal in `account`).value
lazy val `account-service` =
(project in file("."))
.aggregate(`account-api`, `account-common`, `account`)
.settings(publishArtifact := false, skip in publish := true)
lazy val `account-common` = project
.in(file("account-common"))
.enablePlugins(AkkaGrpcPlugin)
.enablePlugins(ProtoRuntime)
.settings(name := "account-common")
.settings(
inConfig(Compile)(
Seq(
PB.protoSources := Seq(file("account-common/src/main/protobuf")),
PB.includePaths ++= Seq(file("account-common/src/main/protobuf"), file("submodules/protobuf")),
PB.targets ++= Seq(scalapb.validate.gen() -> (sourceManaged in Compile).value / "scalapb")
)
),
// Using Scala
akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Scala),
akkaGrpcExtraGenerators in Compile += PlayScalaServerCodeGenerator,
akkaGrpcCodeGeneratorSettings += "server_power_apis",
akkaGrpcCodeGeneratorSettings := akkaGrpcCodeGeneratorSettings.value.filterNot(_ == "flat_package"),
target in akkaGrpcCodeGeneratorSettings in Compile := (sourceManaged in Compile).value / "scalapb"
)
lazy val `account-api` = project
.in(file("account-api"))
.enablePlugins(LagomApi)
.settings(name := "account-api")
.dependsOn(`account-common`)
lazy val `account` = project
.in(file("account"))
.enablePlugins(LagomScala, JavaAgent)
.enablePlugins(PlayAkkaHttp2Support)
.enablePlugins(JavaAppPackaging)
.enablePlugins(LagomImpl)
.settings(name := "account", javaAgents += "io.kamon" % "kanela-agent" % "1.0.6")
.dependsOn(`account-api`)