From 18fc8c11d18675541c5b3cfd75890e1f3a24e5fd Mon Sep 17 00:00:00 2001 From: Jason Pickens Date: Mon, 26 May 2025 23:19:56 +1200 Subject: [PATCH] Update dependencies --- build.sbt | 15 +++++++++------ project/build.properties | 2 +- project/plugin.sbt | 4 ++-- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build.sbt b/build.sbt index ba5a72d..0ea227a 100644 --- a/build.sbt +++ b/build.sbt @@ -1,4 +1,4 @@ -import scalapb.compiler.Version.{grpcJavaVersion, scalapbVersion, protobufVersion} +import scalapb.compiler.Version.{scalapbVersion, protobufVersion} val unusedWarnings = ( "-Ywarn-unused" :: @@ -9,12 +9,12 @@ lazy val root = project.in(file(".")).aggregate( grpcJavaSample, grpcScalaSample ) -def Scala212 = "2.12.16" +def Scala3 = "3.7.0" val commonSettings: Seq[Def.Setting[_]] = Seq[Def.Setting[_]]( Test / fork := true, - scalaVersion := Scala212, - crossScalaVersions := List(Scala212), // TODO add Scala 2.13 + scalaVersion := Scala3, + crossScalaVersions := List(Scala3), libraryDependencies += "io.grpc" % "grpc-netty" % grpcJavaVersion, libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime" % scalapbVersion % "protobuf" ) @@ -22,7 +22,7 @@ val commonSettings: Seq[Def.Setting[_]] = Seq[Def.Setting[_]]( lazy val grpcScalaSample = project.in(file("grpc-scala")).settings( commonSettings, libraryDependencies += "com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapbVersion, - Compile / PB.targets := Seq(scalapb.gen() -> (Compile / sourceManaged).value), + Compile / PB.targets := Seq(scalapb.gen(scala3Sources = true) -> (Compile / sourceManaged).value), Compile / unmanagedResourceDirectories += (LocalRootProject / baseDirectory).value / "grpc-java/examples/src/main/resources", Compile / PB.protoSources += (LocalRootProject / baseDirectory).value / "grpc-java/examples/src/main/proto", scalacOptions ++= ( @@ -58,12 +58,15 @@ lazy val grpcExeUrl = val grpcExePath = SettingKey[xsbti.api.Lazy[File]]("grpcExePath") +val grpcJavaVersion = "1.72.0" + lazy val grpcJavaSample = project.in(file("grpc-java/examples")).settings( commonSettings, Compile / PB.targets := Seq(PB.gens.java(protobufVersion) -> (Compile / sourceManaged).value), Compile / PB.protocOptions ++= Seq( s"--plugin=protoc-gen-java_rpc=${grpcExePath.value.get}", - s"--java_rpc_out=${((Compile / sourceManaged).value).getAbsolutePath}" + s"--java_rpc_out=${((Compile / sourceManaged).value).getAbsolutePath}", + s"--java_rpc_opt=@generated=omit" ), grpcExePath := xsbti.api.SafeLazyProxy { val exe = (LocalRootProject / baseDirectory).value / ".bin" / grpcExeFileName diff --git a/project/build.properties b/project/build.properties index c8fcab5..6520f69 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.6.2 +sbt.version=1.11.0 diff --git a/project/plugin.sbt b/project/plugin.sbt index 504f913..318bd48 100644 --- a/project/plugin.sbt +++ b/project/plugin.sbt @@ -1,3 +1,3 @@ -addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.19") +addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7") -libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.8.4" +libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.17"