This repository has been archived by the owner on Feb 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
67 lines (56 loc) · 2.19 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
import com.lightbend.sbt.javaagent.JavaAgent.JavaAgentKeys.javaAgents
import akka.grpc.gen.scaladsl.ScalaClientCodeGenerator
organization in ThisBuild := "com.example"
version in ThisBuild := "1.0-SNAPSHOT"
// the Scala version that will be used for cross-compiled libraries
scalaVersion in ThisBuild := "2.12.4"
val macwire = "com.softwaremill.macwire" %% "macros" % "2.3.0" % "provided"
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.4" % Test
lazy val `lagom-grpc-labs` = (project in file("."))
.aggregate(`hello-api`, `hello-impl`, `play-app`)
lazy val `hello-api` = (project in file("hello-api"))
.settings(
libraryDependencies ++= Seq(
lagomScaladslApi
)
)
lazy val `hello-impl` = (project in file("hello-impl"))
.enablePlugins(LagomScala,
// JavaAgent,
AkkaGrpcPlugin)
.settings(
libraryDependencies ++= Seq(
macwire
),
)
.settings(
PB.protoSources in Compile += target.value / "protobuf",
akkaGrpcGeneratedSources := Seq(AkkaGrpc.Client, AkkaGrpc.Server),
// javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.7" % "runtime",
)
.settings(lagomForkedTestSettings: _*)
.dependsOn(`hello-api`)
// !!! JavaAgent is not triggering because lagom's runAll ir not a regular sbt run but
// a custom taskKey. The current solution is to add the `javaagent` argument into
// .jvmopts and look in another direction.
// We're leaving JavaAgent and "javaAgents +=" enabled to trigger the artifact download.
lazy val `play-app` = (project in file("play-app"))
.enablePlugins(PlayScala, LagomPlay,
JavaAgent,
AkkaGrpcPlugin)
.disablePlugins(PlayLayoutPlugin)
.settings(
libraryDependencies ++= Seq(
macwire
),
)
.settings(
PB.protoSources in Compile += target.value / "protobuf",
akkaGrpcGeneratedSources := Seq(AkkaGrpc.Client),
javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.7" % "runtime",
)
.settings(lagomForkedTestSettings: _*)
lagomServicesPortRange in ThisBuild := PortRange(50000, 51000)
lagomKafkaEnabled in ThisBuild := false
lagomCassandraEnabled in ThisBuild := false
lagomUnmanagedServices in ThisBuild += ("helloworld.GreeterService" -> "http://127.0.0.1:8080")