Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ object Service {

Service(
fileDesc.fileDescriptorObject.fullName + ".javaDescriptor",
fileDesc.scalaPackage.fullName,
trimRootPackage(fileDesc.scalaPackage.fullName),
serviceClassName,
(if (fileDesc.getPackage.isEmpty) "" else fileDesc.getPackage + ".") + serviceDescriptor.getName,
serviceDescriptor.getMethods.asScala.map(method => Method(method)).toList,
Expand All @@ -60,4 +60,10 @@ object Service {
serviceDescriptor.comment,
new ScalaCompatConstants(fileDesc.emitScala3Sources))
}

private def trimRootPackage(packageName: String): String = {
val prefix = "_root_."
if (packageName.startsWith(prefix)) packageName.substring(prefix.length)
else packageName
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import org.gradle.api.Project

class PekkoGrpcPluginExtension {

static final String PROTOC_VERSION = "3.25.8" // checked synced by VersionSyncCheckPlugin
static final String PROTOC_VERSION = "4.32.1" // checked synced by VersionSyncCheckPlugin

static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12"

Expand Down
4 changes: 2 additions & 2 deletions maven-plugin/src/main/maven/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<extraGenerators implementation="java.util.List" default-value=""/>
<protoPaths default-value="${project.basedir}/src/main/proto,${project.basedir}/src/main/protobuf">${pekko-grpc.protoPaths}</protoPaths>
<outputDirectory default-value="${project.build.directory}/generated-sources">${pekko-grpc.outputDirectory}</outputDirectory>
<protocVersion implementation="java.lang.String" default-value="-v3.25.8">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<protocVersion implementation="java.lang.String" default-value="-v4.32.1">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<includeStdTypes implementation="boolean" default-value="false" />
</configuration>
</mojo>
Expand Down Expand Up @@ -191,7 +191,7 @@
<extraGenerators implementation="java.util.List" default-value=""/>
<protoPaths default-value="src/test/proto,src/test/protobuf">${pekko-grpc.protoPaths}</protoPaths>
<outputDirectory default-value="target/generated-test-sources">${pekko-grpc.outputDirectory}</outputDirectory>
<protocVersion implementation="java.lang.String" default-value="-v3.25.8">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<protocVersion implementation="java.lang.String" default-value="-v4.32.1">${pekko-grpc.protoc-version}</protocVersion> <!-- checked synced by VersionSyncCheckPlugin -->
<includeStdTypes implementation="boolean" default-value="false" />
</configuration>
</mojo>
Expand Down
4 changes: 2 additions & 2 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,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.8" // checked synced by VersionSyncCheckPlugin
val googleProtobufJava = "3.25.8"
val googleProtoc = "4.32.1" // checked synced by VersionSyncCheckPlugin
val googleProtobufJava = "4.32.1"

val scalaTest = "3.2.19"

Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.5.2025082
// scripted testing
libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value

libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.20"
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "1.0.0-alpha.3"
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import scalapb.GeneratorOption._

scalaVersion := "2.13.18"

// ScalaPB Validate sbt plugin does not have a release that supports ScalaPB 1.0.0
Global / evictionErrorLevel := Level.Info

enablePlugins(PekkoGrpcPlugin)

libraryDependencies +=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@

addSbtPlugin("org.apache.pekko" % "pekko-grpc-sbt-plugin" % sys.props("project.version"))

libraryDependencies ++= Seq("com.thesamet.scalapb" %% "scalapb-validate-codegen" % "0.3.0")
// ScalaPB Validate sbt plugin does not have a release that supports ScalaPB 1.0.0
Global / evictionErrorLevel := Level.Info

libraryDependencies ++= Seq("com.thesamet.scalapb" %% "scalapb-validate-codegen" % "0.3.6")