Skip to content

Commit a977385

Browse files
authored
Upgrade dependencies
The GSON upgrade slightly changed an error string, so the test was updated to be less of a change detector. Some OpenTelemetry dependencies are alpha versions, so needed an adjustment in build.gradle to accept the versions. Similarly, Undertow includes Final in its version numbers which needs to be accepted.
1 parent 6dd6ca9 commit a977385

File tree

29 files changed

+124
-123
lines changed

29 files changed

+124
-123
lines changed

MODULE.bazel

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,17 @@ module(
99
IO_GRPC_GRPC_JAVA_ARTIFACTS = [
1010
"com.google.android:annotations:4.1.1.4",
1111
"com.google.api.grpc:proto-google-common-protos:2.29.0",
12-
"com.google.auth:google-auth-library-credentials:1.22.0",
13-
"com.google.auth:google-auth-library-oauth2-http:1.22.0",
14-
"com.google.auto.value:auto-value-annotations:1.10.4",
15-
"com.google.auto.value:auto-value:1.10.4",
12+
"com.google.auth:google-auth-library-credentials:1.23.0",
13+
"com.google.auth:google-auth-library-oauth2-http:1.23.0",
14+
"com.google.auto.value:auto-value-annotations:1.11.0",
15+
"com.google.auto.value:auto-value:1.11.0",
1616
"com.google.code.findbugs:jsr305:3.0.2",
17-
"com.google.code.gson:gson:2.10.1",
18-
"com.google.errorprone:error_prone_annotations:2.23.0",
17+
"com.google.code.gson:gson:2.11.0",
18+
"com.google.errorprone:error_prone_annotations:2.28.0",
1919
"com.google.guava:failureaccess:1.0.1",
20-
"com.google.guava:guava:32.1.3-android",
20+
"com.google.guava:guava:33.2.1-android",
2121
"com.google.re2j:re2j:1.7",
22-
"com.google.truth:truth:1.1.5",
22+
"com.google.truth:truth:1.4.2",
2323
"com.squareup.okhttp:okhttp:2.7.5",
2424
"com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day
2525
"io.netty:netty-buffer:4.1.100.Final",
@@ -38,10 +38,10 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
3838
"io.netty:netty-transport:4.1.100.Final",
3939
"io.opencensus:opencensus-api:0.31.0",
4040
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
41-
"io.perfmark:perfmark-api:0.26.0",
41+
"io.perfmark:perfmark-api:0.27.0",
4242
"junit:junit:4.13.2",
4343
"org.apache.tomcat:annotations-api:6.0.53",
44-
"org.codehaus.mojo:animal-sniffer-annotations:1.23",
44+
"org.codehaus.mojo:animal-sniffer-annotations:1.24",
4545
]
4646
# GRPC_DEPS_END
4747

authz/src/test/java/io/grpc/authz/AuthorizationPolicyTranslatorTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ public void invalidPolicy() throws Exception {
4545
AuthorizationPolicyTranslator.translate(policy);
4646
fail("exception expected");
4747
} catch (IOException ioe) {
48-
assertThat(ioe).hasMessageThat().isEqualTo(
49-
"Use JsonReader.setLenient(true) to accept malformed JSON"
50-
+ " at line 1 column 18 path $.name");
48+
assertThat(ioe).hasMessageThat().contains("malformed JSON");
49+
assertThat(ioe).hasMessageThat().contains("at line 1 column 18 path $.name");
5150
}
5251
}
5352

authz/src/test/java/io/grpc/authz/AuthorizationServerInterceptorTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,8 @@ public void invalidPolicyFailsStaticAuthzInterceptorCreation() throws Exception
3535
AuthorizationServerInterceptor.create(policy);
3636
fail("exception expected");
3737
} catch (IOException ioe) {
38-
assertThat(ioe).hasMessageThat().isEqualTo(
39-
"Use JsonReader.setLenient(true) to accept malformed JSON"
40-
+ " at line 1 column 18 path $.name");
38+
assertThat(ioe).hasMessageThat().contains("malformed JSON");
39+
assertThat(ioe).hasMessageThat().contains("at line 1 column 18 path $.name");
4140
}
4241
}
4342

build.gradle

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,14 @@ def isAcceptableVersion(ModuleComponentIdentifier candidate) {
474474
return true
475475
if (group == 'io.netty' && version.contains('Final'))
476476
return true
477+
if (group == 'io.undertow' && version.contains('Final'))
478+
return true
477479
if (module == 'android-api-level-19')
478480
return true
481+
if (module == 'opentelemetry-exporter-prometheus')
482+
return true
483+
if (module == 'opentelemetry-gcp-resources')
484+
return true
479485
return version ==~ /^[0-9]+(\.[0-9]+)+$/
480486
}
481487

buildSrc/src/main/java/io/grpc/gradle/CheckForUpdatesTask.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@
2828
import org.gradle.api.artifacts.ModuleVersionIdentifier;
2929
import org.gradle.api.artifacts.VersionCatalog;
3030
import org.gradle.api.artifacts.VersionCatalogsExtension;
31+
import org.gradle.api.artifacts.result.DependencyResult;
3132
import org.gradle.api.artifacts.result.ResolvedComponentResult;
3233
import org.gradle.api.artifacts.result.ResolvedDependencyResult;
34+
import org.gradle.api.artifacts.result.UnresolvedDependencyResult;
3335
import org.gradle.api.provider.Provider;
3436
import org.gradle.api.tasks.Input;
3537
import org.gradle.api.tasks.Nested;
@@ -88,8 +90,14 @@ protected Set<Library> getLibraries() {
8890
public void checkForUpdates() {
8991
for (Library lib : libraries) {
9092
String name = lib.getName();
91-
ModuleVersionIdentifier oldId = ((ResolvedDependencyResult) lib.getOldResult().get()
92-
.getDependencies().iterator().next()).getSelected().getModuleVersion();
93+
DependencyResult oldResult = lib.getOldResult().get().getDependencies().iterator().next();
94+
if (oldResult instanceof UnresolvedDependencyResult) {
95+
System.out.println(String.format(
96+
"- Current version of libs.%s not resolved", name));
97+
continue;
98+
}
99+
ModuleVersionIdentifier oldId =
100+
((ResolvedDependencyResult) oldResult).getSelected().getModuleVersion();
93101
ModuleVersionIdentifier newId = ((ResolvedDependencyResult) lib.getNewResult().get()
94102
.getDependencies().iterator().next()).getSelected().getModuleVersion();
95103
if (oldId != newId) {

examples/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ java {
2424
// Feel free to delete the comment at the next line. It is just for safely
2525
// updating the version in our release process.
2626
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
27-
def protobufVersion = '3.25.1'
27+
def protobufVersion = '3.25.3'
2828
def protocVersion = protobufVersion
2929

3030
dependencies {

examples/example-alts/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ java {
2525
// Feel free to delete the comment at the next line. It is just for safely
2626
// updating the version in our release process.
2727
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
28-
def protocVersion = '3.25.1'
28+
def protocVersion = '3.25.3'
2929

3030
dependencies {
3131
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub

examples/example-debug/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ java {
2626
// Feel free to delete the comment at the next line. It is just for safely
2727
// updating the version in our release process.
2828
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
29-
def protobufVersion = '3.25.1'
29+
def protobufVersion = '3.25.3'
3030

3131
dependencies {
3232
implementation "io.grpc:grpc-protobuf:${grpcVersion}"

examples/example-debug/pom.xml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<properties>
1414
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
1515
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
16-
<protoc.version>3.25.1</protoc.version>
16+
<protoc.version>3.25.3</protoc.version>
1717
<!-- required for jdk9 -->
1818
<maven.compiler.source>1.8</maven.compiler.source>
1919
<maven.compiler.target>1.8</maven.compiler.target>
@@ -34,15 +34,15 @@
3434
<dependencies>
3535
<dependency>
3636
<groupId>io.grpc</groupId>
37-
<artifactId>grpc-protobuf</artifactId>
37+
<artifactId>grpc-services</artifactId>
3838
</dependency>
3939
<dependency>
4040
<groupId>io.grpc</groupId>
41-
<artifactId>grpc-stub</artifactId>
41+
<artifactId>grpc-protobuf</artifactId>
4242
</dependency>
4343
<dependency>
4444
<groupId>io.grpc</groupId>
45-
<artifactId>grpc-services</artifactId>
45+
<artifactId>grpc-stub</artifactId>
4646
</dependency>
4747
<dependency>
4848
<groupId>org.apache.tomcat</groupId>
@@ -55,11 +55,6 @@
5555
<artifactId>grpc-netty-shaded</artifactId>
5656
<scope>runtime</scope>
5757
</dependency>
58-
<dependency> <!-- prevent downgrade of version in protobuf-java-util from grpc-services -->
59-
<groupId>com.google.guava</groupId>
60-
<artifactId>guava</artifactId>
61-
<version>32.1.3-jre</version>
62-
</dependency>
6358
<dependency>
6459
<groupId>junit</groupId>
6560
<artifactId>junit</artifactId>

examples/example-gauth/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ java {
2525
// Feel free to delete the comment at the next line. It is just for safely
2626
// updating the version in our release process.
2727
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
28-
def protobufVersion = '3.25.1'
28+
def protobufVersion = '3.25.3'
2929
def protocVersion = protobufVersion
3030

3131

@@ -34,7 +34,7 @@ dependencies {
3434
implementation "io.grpc:grpc-stub:${grpcVersion}"
3535
implementation "io.grpc:grpc-auth:${grpcVersion}"
3636
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
37-
implementation "com.google.auth:google-auth-library-oauth2-http:1.4.0"
37+
implementation "com.google.auth:google-auth-library-oauth2-http:1.23.0"
3838
implementation "com.google.api.grpc:grpc-google-cloud-pubsub-v1:0.1.24"
3939
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
4040
}

0 commit comments

Comments
 (0)