Skip to content

Commit

Permalink
Use grpcJavaVersion from scalapb, expose in SBT for fs2-grpc users
Browse files Browse the repository at this point in the history
  • Loading branch information
fiadliel authored and rossabaker committed Feb 4, 2019
1 parent ab42d39 commit 61d67fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lazy val `sbt-java-gen` = project
crossSbtVersions := List(sbtVersion.value, "0.13.17"),
buildInfoPackage := "org.lyranthe.fs2_grpc.buildinfo",
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.18"),
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.7.1"
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % scalapb.compiler.Version.scalapbVersion
)

lazy val `java-runtime` = project
Expand All @@ -48,8 +48,8 @@ lazy val `java-runtime` = project
publishTo := sonatypePublishTo.value,
libraryDependencies ++= List(
"co.fs2" %% "fs2-core" % "0.10.3",
"io.grpc" % "grpc-core" % "1.11.0",
"io.grpc" % "grpc-netty-shaded" % "1.11.0" % "test",
"io.grpc" % "grpc-core" % scalapb.compiler.Version.grpcJavaVersion,
"io.grpc" % "grpc-netty-shaded" % scalapb.compiler.Version.grpcJavaVersion % "test",
"io.monix" %% "minitest" % "2.1.1" % "test",
"org.typelevel" %% "cats-effect-laws" % "0.10" % "test"
),
Expand Down
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.3.4")

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.3")

addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.18")
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.7.1"
2 changes: 2 additions & 0 deletions sbt-java-gen/src/main/scala/Fs2GrpcPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ object Fs2Grpc extends AutoPlugin {

object Fs2GrpcPlugin extends AutoPlugin {
object autoImport {
val grpcJavaVersion: String = scalapb.compiler.Version.grpcJavaVersion

object CodeGeneratorOption {
case object FlatPackage extends CodeGeneratorOption {
override def toString = "flat_package"
Expand Down

0 comments on commit 61d67fa

Please sign in to comment.