diff --git a/.scala-steward.conf b/.scala-steward.conf index afb66961..056620aa 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -15,9 +15,6 @@ updates.pin = [ # Scala 3.3 is a LTS { groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.3." } - # when we update to protobuf 4.x we probably need to update a bunch of libraries - # in tandem, and possibly schedule this for a major pekko-grpc release - { groupId = "com.google.protobuf", version = "3." } # Issues when using GRPC 1.68+ - https://github.com/apache/pekko-grpc/pull/397 { groupId = "io.grpc", version = "1.67." } diff --git a/build.sbt b/build.sbt index 4986ba78..d1a70bf9 100644 --- a/build.sbt +++ b/build.sbt @@ -20,6 +20,7 @@ sourceDistName := "apache-pekko-grpc" sourceDistIncubating := false ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec) ThisBuild / resolvers += Resolver.ApacheMavenStagingRepo +ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots") commands := commands.value.filterNot { command => command.nameOption.exists { name => @@ -291,6 +292,7 @@ lazy val pluginTesterScala = Project(id = "plugin-tester-scala", base = file("pl fork := true, crossScalaVersions := Dependencies.Versions.CrossScalaForLib, scalaVersion := scala212, + PB.protocVersion := Dependencies.Versions.googleProtoc, ReflectiveCodeGen.codeGeneratorSettings ++= Seq("flat_package", "server_power_apis")) .pluginTestingSettings .enablePlugins(NoPublish) diff --git a/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy b/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy index 74d4a12c..3fa6b8c6 100644 --- a/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy +++ b/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy @@ -14,7 +14,7 @@ import org.gradle.api.Project class PekkoGrpcPluginExtension { - static final String PROTOC_VERSION = "3.25.5" // checked synced by VersionSyncCheckPlugin + static final String PROTOC_VERSION = "4.28.2" // checked synced by VersionSyncCheckPlugin static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12" diff --git a/maven-plugin/src/main/maven/plugin.xml b/maven-plugin/src/main/maven/plugin.xml index 18a8bc38..9bf1470f 100644 --- a/maven-plugin/src/main/maven/plugin.xml +++ b/maven-plugin/src/main/maven/plugin.xml @@ -95,7 +95,7 @@ ${pekko-grpc.protoPaths} ${pekko-grpc.outputDirectory} - ${pekko-grpc.protoc-version} + ${pekko-grpc.protoc-version} @@ -187,7 +187,7 @@ ${pekko-grpc.protoPaths} ${pekko-grpc.outputDirectory} - ${pekko-grpc.protoc-version} + ${pekko-grpc.protoc-version} diff --git a/plugin-tester-scala/build.gradle b/plugin-tester-scala/build.gradle index 42edf46a..67b1ed60 100644 --- a/plugin-tester-scala/build.gradle +++ b/plugin-tester-scala/build.gradle @@ -26,6 +26,7 @@ def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}" dependencies { implementation "org.apache.pekko:pekko-http-cors_${scalaBinaryVersion}:1.1.0" implementation "org.scala-lang:scala-library:${scalaFullVersion}" + implementation 'com.google.protobuf:protobuf-java:4.28.2' testImplementation "org.apache.pekko:pekko-stream-testkit_${scalaBinaryVersion}:1.1.2" testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.2.19" testImplementation "org.scalatestplus:junit-4-13_${scalaBinaryVersion}:3.2.19.0" diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 319b5480..ad6f05ca 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -36,8 +36,8 @@ object Dependencies { // 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 org.apache.pekko.grpc.sbt.PekkoGrpcPlugin - val googleProtoc = "3.25.5" // checked synced by VersionSyncCheckPlugin - val googleProtobufJava = "3.25.5" + val googleProtobufJava = "4.28.2" + val googleProtoc = googleProtobufJava // checked synced by VersionSyncCheckPlugin val scalaTest = "3.2.19" @@ -130,5 +130,6 @@ object Dependencies { Compile.grpcStub, Test.scalaTest, Test.scalaTestPlusJunit, + Protobuf.protobufJava, Protobuf.googleCommonProtos) } diff --git a/project/plugins.sbt b/project/plugins.sbt index fbb8be43..8afc8f49 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -41,4 +41,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.2024011 // scripted testing libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.17" +libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "1.0.0-alpha.1"