Skip to content

Commit 1551cc7

Browse files
committed
Upgrade Protobuf Java to 3.22.3 (aka 22.3)
The version used by protoc-gen-grpc-java will be upgraded separately, because of large C++ build changes necessary. But that won't impact users at all. We are upgrading to protoc 22.3; only the grpc plugin is not upgraded. Bazel is upgraded for both Java and C++.
1 parent bcbdb20 commit 1551cc7

File tree

34 files changed

+61
-36
lines changed

34 files changed

+61
-36
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14

all/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ evaluationDependsOn(':grpc-interop-testing')
3636

3737
dependencies {
3838
api subprojects.minus([project(':grpc-protobuf-lite')])
39+
implementation libraries.guava.jre // JRE required by transitive protobuf-java-util
3940
}
4041

4142
tasks.named("javadoc").configure {

alts/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies {
1919
project(':grpc-stub'),
2020
libraries.protobuf.java,
2121
libraries.conscrypt,
22-
libraries.guava,
22+
libraries.guava.jre, // JRE required by protobuf-java-util from grpclb
2323
libraries.google.auth.oauth2Http
2424
def nettyDependency = implementation project(':grpc-netty')
2525
compileOnly libraries.javax.annotation

authz/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ description = "gRPC: Authorization"
1111

1212
dependencies {
1313
implementation project(':grpc-protobuf'),
14-
project(':grpc-core')
14+
project(':grpc-core'),
15+
libraries.guava.jre // JRE required by transitive protobuf-java-util
1516

1617
annotationProcessor libraries.auto.value
1718
compileOnly libraries.javax.annotation

benchmarks/src/main/java/io/grpc/benchmarks/qps/AbstractConfigurationBuilder.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ public final T build(String[] args) {
147147
}
148148

149149
@Override
150+
@SuppressWarnings("InlineMeInliner") // String.repeat() requires Java 11
150151
public final void printUsage() {
151152
System.out.println("Usage: [ARGS...]");
152153
int column1Width = 0;
@@ -210,6 +211,7 @@ private static String commandLineFlag(Param param) {
210211
return "--" + name + type;
211212
}
212213

214+
@SuppressWarnings("InlineMeInliner") // String.repeat() requires Java 11
213215
private static String wordWrap(String text, int startPos, int maxPos) {
214216
StringBuilder builder = new StringBuilder();
215217
int pos = startPos;

examples/.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14

examples/WORKSPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")
2828

2929
grpc_java_repositories()
3030

31+
# Protobuf now requires C++14 or higher, which requires Bazel configuration
32+
# outside the WORKSPACE. See .bazelrc in this directory.
3133
load("@com_google_protobuf//:protobuf_deps.bzl", "PROTOBUF_MAVEN_ARTIFACTS")
3234
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
3335

examples/android/clientcache/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ android {
3232
}
3333

3434
protobuf {
35-
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
35+
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
3636
plugins {
3737
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.55.0-SNAPSHOT' // CURRENT_GRPC_VERSION
3838
}

examples/android/helloworld/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ android {
3030
}
3131

3232
protobuf {
33-
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
33+
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
3434
plugins {
3535
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.55.0-SNAPSHOT' // CURRENT_GRPC_VERSION
3636
}

examples/android/routeguide/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ android {
3030
}
3131

3232
protobuf {
33-
protoc { artifact = 'com.google.protobuf:protoc:3.21.7' }
33+
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
3434
plugins {
3535
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.55.0-SNAPSHOT' // CURRENT_GRPC_VERSION
3636
}

0 commit comments

Comments
 (0)