Skip to content

Commit b9d3629

Browse files
committed
Update google-common-protos/cloud-pubsub with workaround
This re-adds google-common-protos and cloud pubsub with a workaround for googleapis/java-common-protos#210 See scalapb/ScalaPB#1122
1 parent 738bed0 commit b9d3629

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

build.sbt

+3-5
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,26 @@ sonatypeBundleDirectory := (ThisBuild / baseDirectory).value / "target" / "sonat
88

99
publish / skip := true
1010

11-
/* Skipping common protos due to https://github.com/googleapis/api-common-protos/issues/83
1211
def commonProtos =
1312
ProtosProject(
14-
"com.google.api.grpc" % "proto-google-common-protos" % "1.18.1",
13+
"com.google.api.grpc" % "proto-google-common-protos" % "2.4.1",
1514
grpc = true,
1615
protoPackage = "google",
17-
buildNumber = 2
16+
buildNumber = 0
1817
)
1918
lazy val commonProtos09 = commonProtos.scalapb09
2019
lazy val commonProtos10 = commonProtos.scalapb10
2120
lazy val commonProtos11 = commonProtos.scalapb11
2221

2322
val cloudPubSub = ProtosProject(
24-
"com.google.api.grpc" % "proto-google-cloud-pubsub-v1" % "1.93.4",
23+
"com.google.api.grpc" % "proto-google-cloud-pubsub-v1" % "1.96.2",
2524
grpc = true,
2625
protoPackage = "google",
2726
buildNumber = 0
2827
).dependsOn(commonProtos)
2928
lazy val cloudPubSub09 = cloudPubSub.scalapb09
3029
lazy val cloudPubSub10 = cloudPubSub.scalapb10
3130
lazy val cloudPubSub11 = cloudPubSub.scalapb11
32-
*/
3331

3432
val pgvProto = ProtosProject(
3533
"io.envoyproxy.protoc-gen-validate" % "pgv-java-stub" % "0.6.1",

project/BuildHelpers.scala

+11-1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ final case class ProtosProject(
100100
}.taskValue,
101101
Compile / packageBin / packageOptions += {
102102
Package.ManifestAttributes("ScalaPB-Options-Proto" -> optionsFile)
103+
},
104+
// Workaround for https://github.com/googleapis/java-common-protos/issues/210
105+
Compile / PB.runProtoc := {
106+
val runner = (Compile / PB.runProtoc).value
107+
protocbridge.ProtocRunner.fromFunction { (args, extraEnv) =>
108+
runner.run(
109+
args.filterNot(_.contains("google/cloud/common_resources.proto")),
110+
extraEnv
111+
)
112+
}
103113
}
104114
)
105115
}
@@ -115,7 +125,7 @@ final case class ProtosProject(
115125
)
116126

117127
val scalapb11: Project =
118-
protoProject("0.11.3").dependsOn(
128+
protoProject("0.11.5").dependsOn(
119129
dependencies.map(d => ClasspathDependency(d.scalapb11, None)): _*
120130
)
121131

0 commit comments

Comments
 (0)