This repository has been archived by the owner on Jan 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbuild.sbt
57 lines (49 loc) · 2.33 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
import Dependencies._
lazy val pea = Project("pea", file("."))
.enablePlugins(PlayScala)
.settings(commonSettings: _*)
.settings(publishSettings: _*)
.dependsOn(
peaCommon % "compile->compile;test->test",
peaDubbo % "compile->compile;test->test",
peaGrpc % "compile->compile;test->test",
).aggregate(peaCommon, peaDubbo, peaGrpc)
// pea-app dependencies
val gatlingVersion = "3.3.1"
val gatling = "io.gatling.highcharts" % "gatling-charts-highcharts" % gatlingVersion exclude("io.gatling", "gatling-app")
val gatlingCompiler = "io.gatling" % "gatling-compiler" % gatlingVersion
val curator = "org.apache.curator" % "curator-recipes" % "2.12.0"
val oshiCore = "com.github.oshi" % "oshi-core" % "4.0.0"
libraryDependencies ++= Seq(akkaStream, gatling, gatlingCompiler, curator, oshiCore) ++ appPlayDeps
libraryDependencies += "org.scalatestplus.play" %% "scalatestplus-play" % "4.0.3" % Test
// pea-common
lazy val peaCommon = subProject("pea-common")
.settings(libraryDependencies ++= commonDependencies)
// pea-dubbo
val dubbo = "org.apache.dubbo" % "dubbo" % "2.7.4.1"
lazy val peaDubbo = subProject("pea-dubbo")
.settings(libraryDependencies ++= Seq(
gatling, dubbo,
))
// pea-grpc
val grpcVersion = "1.22.2" // override 1.8, com.trueaccord.scalapb.compiler.Version.grpcJavaVersion
val grpcNetty = "io.grpc" % "grpc-netty" % grpcVersion exclude("io.netty", "netty-codec-http2") // be compatible with gatling(4.1.42.Final)
val scalapbRuntime = "com.trueaccord.scalapb" %% "scalapb-runtime-grpc" % com.trueaccord.scalapb.compiler.Version.scalapbVersion
// Override the version that scalapb depends on. This adds an explicit dependency on
// protobuf-java. This will cause sbt to evict the older version that is used by
// scalapb-runtime.
val protobuf = "com.google.protobuf" % "protobuf-java" % "3.7.0"
lazy val peaGrpc = subProject("pea-grpc")
.settings(libraryDependencies ++= Seq(
gatling, grpcNetty, scalapbRuntime, protobuf
))
// options: https://github.com/thesamet/sbt-protoc
PB.protoSources in Compile := Seq(
baseDirectory.value / "test/protobuf"
)
PB.targets in Compile := Seq(
scalapb.gen(grpc = true) -> baseDirectory.value / "test-generated"
)
unmanagedSourceDirectories in Compile += baseDirectory.value / "test-generated"
sourceGenerators in Compile -= (PB.generate in Compile).taskValue
coverageEnabled := false