/
Dependencies.scala
155 lines (127 loc) · 5.73 KB
/
Dependencies.scala
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
package akka.grpc
import sbt._
import sbt.Keys._
import buildinfo.BuildInfo
object Dependencies {
object Versions {
val scala212 = "2.12.19"
val scala213 = "2.13.14"
val scala3 = "3.3.3"
// the order in the list is important because the head will be considered the default.
val CrossScalaForLib = Seq(scala213, scala3)
val CrossScalaForPlugin = Seq(scala212)
// We don't force Akka updates because downstream projects can upgrade
// themselves. For more information see
// https://doc.akka.io//docs/akka/current/project/downstream-upgrade-strategy.html
val akka = "2.9.3"
val akkaBinary = "2.9"
val akkaHttp = "10.6.3"
val akkaHttpBinary = "10.6"
val grpc = "1.63.0" // checked synced by VersionSyncCheckPlugin
// Even referenced explicitly in the sbt-plugin's sbt-tests
// If changing this, remember to update protoc plugin version to align in
// maven-plugin/src/main/maven/plugin.xml and akka.grpc.sbt.AkkaGrpcPlugin
val googleProtobuf = "3.24.0" // checked synced by VersionSyncCheckPlugin
val googleApi = "2.39.1"
val scalaTest = "3.2.12"
val maven = "3.9.6"
}
object Compile {
val akkaStream = "com.typesafe.akka" %% "akka-stream" % Versions.akka
val akkaPki = "com.typesafe.akka" %% "akka-pki" % Versions.akka
val akkaHttp = "com.typesafe.akka" %% "akka-http" % Versions.akkaHttp
val akkaHttpCore = "com.typesafe.akka" %% "akka-http-core" % Versions.akkaHttp
val akkaDiscovery = "com.typesafe.akka" %% "akka-discovery" % Versions.akka
val akkaSlf4j = "com.typesafe.akka" %% "akka-slf4j" % Versions.akka
val scalapbCompilerPlugin = "com.thesamet.scalapb" %% "compilerplugin" % scalapb.compiler.Version.scalapbVersion
val scalapbRuntime = ("com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion)
.exclude("io.grpc", "grpc-netty")
val grpcCore = "io.grpc" % "grpc-core" % Versions.grpc
val grpcStub = "io.grpc" % "grpc-stub" % Versions.grpc
val grpcNettyShaded = "io.grpc" % "grpc-netty-shaded" % Versions.grpc
val grpcProtobuf = "io.grpc" % "grpc-protobuf" % Versions.grpc
// Excluding grpc-alts works around a complex resolution bug
// Details are in https://github.com/akka/akka-grpc/pull/469
val grpcInteropTesting = ("io.grpc" % "grpc-interop-testing" % Versions.grpc)
.exclude("io.grpc", "grpc-alts")
.exclude("io.grpc", "grpc-xds")
val slf4jApi = "org.slf4j" % "slf4j-api" % "1.7.36"
val mavenPluginApi = "org.apache.maven" % "maven-plugin-api" % Versions.maven // Apache v2
val mavenCore = "org.apache.maven" % "maven-core" % Versions.maven // Apache v2
val protocJar = "com.github.os72" % "protoc-jar" % "3.11.4"
val plexusBuildApi = "org.sonatype.plexus" % "plexus-build-api" % "0.0.7" % "optional" // Apache v2
}
object Test {
final val Test = sbt.Test
val scalaTest = "org.scalatest" %% "scalatest" % Versions.scalaTest % "test" // Apache V2
val scalaTestPlusJunit = "org.scalatestplus" %% "junit-4-13" % (Versions.scalaTest + ".0") % "test" // Apache V2
val akkaDiscoveryConfig = "com.typesafe.akka" %% "akka-discovery" % Versions.akka % "test"
val akkaTestkit = "com.typesafe.akka" %% "akka-testkit" % Versions.akka % "test"
val akkaTestkitTyped = "com.typesafe.akka" %% "akka-actor-testkit-typed" % Versions.akka % "test"
val akkaStreamTestkit = "com.typesafe.akka" %% "akka-stream-testkit" % Versions.akka % "test"
}
object Runtime {
val logback = "ch.qos.logback" % "logback-classic" % "1.2.13" % "runtime" // Eclipse 1.0
}
object Protobuf {
val protobufJava = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobuf
val googleCommonProtos = "com.google.protobuf" % "protobuf-java" % Versions.googleProtobuf % "protobuf"
}
object GrpcApi {
val googleApiProtos = "com.google.api.grpc" % "proto-google-common-protos" % Versions.googleApi % "protobuf"
}
object Plugins {
val sbtProtoc = "com.thesamet" % "sbt-protoc" % BuildInfo.sbtProtocVersion
}
private val l = libraryDependencies
val codegen = l ++= Seq(
Compile.scalapbCompilerPlugin,
Protobuf.protobufJava, // or else scalapb pulls older version in transitively
Compile.grpcProtobuf,
Test.scalaTest)
val runtime = l ++= Seq(
Compile.scalapbRuntime,
Protobuf.protobufJava, // or else scalapb pulls older version in transitively
Compile.grpcProtobuf,
Compile.grpcCore,
Compile.grpcStub % "provided", // comes from the generators
Compile.grpcNettyShaded,
Compile.akkaStream,
Compile.akkaHttpCore,
Compile.akkaHttp,
Compile.akkaDiscovery,
Test.akkaTestkit,
Test.akkaStreamTestkit,
Test.scalaTest,
Test.scalaTestPlusJunit)
val mavenPlugin = l ++= Seq(
Compile.slf4jApi,
Compile.mavenPluginApi,
Compile.mavenCore,
Compile.protocJar,
Compile.plexusBuildApi,
Test.scalaTest)
val sbtPlugin = Seq(
l ++= Seq(Compile.scalapbCompilerPlugin),
// we depend on it in the settings of the plugin since we set keys of the sbt-protoc plugin
addSbtPlugin(Plugins.sbtProtoc))
val interopTests = l ++= Seq(
Compile.grpcInteropTesting,
Compile.grpcInteropTesting % "protobuf", // gets the proto files for interop tests
Compile.akkaHttp,
Compile.akkaSlf4j,
Runtime.logback,
Test.scalaTest.withConfigurations(Some("compile")),
Test.scalaTestPlusJunit.withConfigurations(Some("compile")),
Test.akkaTestkit,
Test.akkaStreamTestkit)
val pluginTester = l ++= Seq(
// usually automatically added by `suggestedDependencies`, which doesn't work with ReflectiveCodeGen
Compile.grpcStub,
Compile.akkaPki,
Runtime.logback,
Test.scalaTest,
Test.scalaTestPlusJunit,
Test.akkaTestkitTyped,
GrpcApi.googleApiProtos)
}