Skip to content

Commit

Permalink
Upgrade dependencies
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ejona86 committed Jul 11, 2024
1 parent 6dd6ca9 commit a977385
Show file tree
Hide file tree
Showing 29 changed files with 124 additions and 123 deletions.
20 changes: 10 additions & 10 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ module(
IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"com.google.android:annotations:4.1.1.4",
"com.google.api.grpc:proto-google-common-protos:2.29.0",
"com.google.auth:google-auth-library-credentials:1.22.0",
"com.google.auth:google-auth-library-oauth2-http:1.22.0",
"com.google.auto.value:auto-value-annotations:1.10.4",
"com.google.auto.value:auto-value:1.10.4",
"com.google.auth:google-auth-library-credentials:1.23.0",
"com.google.auth:google-auth-library-oauth2-http:1.23.0",
"com.google.auto.value:auto-value-annotations:1.11.0",
"com.google.auto.value:auto-value:1.11.0",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.10.1",
"com.google.errorprone:error_prone_annotations:2.23.0",
"com.google.code.gson:gson:2.11.0",
"com.google.errorprone:error_prone_annotations:2.28.0",
"com.google.guava:failureaccess:1.0.1",
"com.google.guava:guava:32.1.3-android",
"com.google.guava:guava:33.2.1-android",
"com.google.re2j:re2j:1.7",
"com.google.truth:truth:1.1.5",
"com.google.truth:truth:1.4.2",
"com.squareup.okhttp:okhttp:2.7.5",
"com.squareup.okio:okio:2.10.0", # 3.0+ needs swapping to -jvm; need work to avoid flag-day
"io.netty:netty-buffer:4.1.100.Final",
Expand All @@ -38,10 +38,10 @@ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
"io.netty:netty-transport:4.1.100.Final",
"io.opencensus:opencensus-api:0.31.0",
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
"io.perfmark:perfmark-api:0.26.0",
"io.perfmark:perfmark-api:0.27.0",
"junit:junit:4.13.2",
"org.apache.tomcat:annotations-api:6.0.53",
"org.codehaus.mojo:animal-sniffer-annotations:1.23",
"org.codehaus.mojo:animal-sniffer-annotations:1.24",
]
# GRPC_DEPS_END

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ public void invalidPolicy() throws Exception {
AuthorizationPolicyTranslator.translate(policy);
fail("exception expected");
} catch (IOException ioe) {
assertThat(ioe).hasMessageThat().isEqualTo(
"Use JsonReader.setLenient(true) to accept malformed JSON"
+ " at line 1 column 18 path $.name");
assertThat(ioe).hasMessageThat().contains("malformed JSON");
assertThat(ioe).hasMessageThat().contains("at line 1 column 18 path $.name");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ public void invalidPolicyFailsStaticAuthzInterceptorCreation() throws Exception
AuthorizationServerInterceptor.create(policy);
fail("exception expected");
} catch (IOException ioe) {
assertThat(ioe).hasMessageThat().isEqualTo(
"Use JsonReader.setLenient(true) to accept malformed JSON"
+ " at line 1 column 18 path $.name");
assertThat(ioe).hasMessageThat().contains("malformed JSON");
assertThat(ioe).hasMessageThat().contains("at line 1 column 18 path $.name");
}
}

Expand Down
6 changes: 6 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,14 @@ def isAcceptableVersion(ModuleComponentIdentifier candidate) {
return true
if (group == 'io.netty' && version.contains('Final'))
return true
if (group == 'io.undertow' && version.contains('Final'))
return true
if (module == 'android-api-level-19')
return true
if (module == 'opentelemetry-exporter-prometheus')
return true
if (module == 'opentelemetry-gcp-resources')
return true
return version ==~ /^[0-9]+(\.[0-9]+)+$/
}

Expand Down
12 changes: 10 additions & 2 deletions buildSrc/src/main/java/io/grpc/gradle/CheckForUpdatesTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@
import org.gradle.api.artifacts.ModuleVersionIdentifier;
import org.gradle.api.artifacts.VersionCatalog;
import org.gradle.api.artifacts.VersionCatalogsExtension;
import org.gradle.api.artifacts.result.DependencyResult;
import org.gradle.api.artifacts.result.ResolvedComponentResult;
import org.gradle.api.artifacts.result.ResolvedDependencyResult;
import org.gradle.api.artifacts.result.UnresolvedDependencyResult;
import org.gradle.api.provider.Provider;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.Nested;
Expand Down Expand Up @@ -88,8 +90,14 @@ protected Set<Library> getLibraries() {
public void checkForUpdates() {
for (Library lib : libraries) {
String name = lib.getName();
ModuleVersionIdentifier oldId = ((ResolvedDependencyResult) lib.getOldResult().get()
.getDependencies().iterator().next()).getSelected().getModuleVersion();
DependencyResult oldResult = lib.getOldResult().get().getDependencies().iterator().next();
if (oldResult instanceof UnresolvedDependencyResult) {
System.out.println(String.format(
"- Current version of libs.%s not resolved", name));
continue;
}
ModuleVersionIdentifier oldId =
((ResolvedDependencyResult) oldResult).getSelected().getModuleVersion();
ModuleVersionIdentifier newId = ((ResolvedDependencyResult) lib.getNewResult().get()
.getDependencies().iterator().next()).getSelected().getModuleVersion();
if (oldId != newId) {
Expand Down
2 changes: 1 addition & 1 deletion examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion

dependencies {
Expand Down
2 changes: 1 addition & 1 deletion examples/example-alts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub
Expand Down
2 changes: 1 addition & 1 deletion examples/example-debug/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
13 changes: 4 additions & 9 deletions examples/example-debug/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<protoc.version>3.25.3</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand All @@ -34,15 +34,15 @@
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<artifactId>grpc-services</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
Expand All @@ -55,11 +55,6 @@
<artifactId>grpc-netty-shaded</artifactId>
<scope>runtime</scope>
</dependency>
<dependency> <!-- prevent downgrade of version in protobuf-java-util from grpc-services -->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions examples/example-gauth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion


Expand All @@ -34,7 +34,7 @@ dependencies {
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-auth:${grpcVersion}"
compileOnly "org.apache.tomcat:annotations-api:6.0.53"
implementation "com.google.auth:google-auth-library-oauth2-http:1.4.0"
implementation "com.google.auth:google-auth-library-oauth2-http:1.23.0"
implementation "com.google.api.grpc:grpc-google-cloud-pubsub-v1:0.1.24"
runtimeOnly "io.grpc:grpc-netty-shaded:${grpcVersion}"
}
Expand Down
4 changes: 2 additions & 2 deletions examples/example-gauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protobuf.version>3.25.3</protobuf.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down Expand Up @@ -63,7 +63,7 @@
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>1.4.0</version>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>com.google.api.grpc</groupId>
Expand Down
6 changes: 3 additions & 3 deletions examples/example-gcp-csm-observability/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def openTelemetryVersion = '1.39.0'
def openTelemetryPrometheusVersion = '1.39.0-alpha'
def protocVersion = '3.25.3'
def openTelemetryVersion = '1.40.0'
def openTelemetryPrometheusVersion = '1.40.0-alpha'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-gcp-observability/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-hostname/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
13 changes: 4 additions & 9 deletions examples/example-hostname/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<protoc.version>3.25.3</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand All @@ -34,15 +34,15 @@
<dependencies>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-protobuf</artifactId>
<artifactId>grpc-services</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-stub</artifactId>
<artifactId>grpc-protobuf</artifactId>
</dependency>
<dependency>
<groupId>io.grpc</groupId>
<artifactId>grpc-services</artifactId>
<artifactId>grpc-stub</artifactId>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
Expand All @@ -55,11 +55,6 @@
<artifactId>grpc-netty-shaded</artifactId>
<scope>runtime</scope>
</dependency>
<dependency> <!-- prevent downgrade of version in protobuf-java-util from grpc-services -->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.3-jre</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion examples/example-jwt-auth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion

dependencies {
Expand Down
4 changes: 2 additions & 2 deletions examples/example-jwt-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protoc.version>3.25.1</protoc.version>
<protobuf.version>3.25.3</protobuf.version>
<protoc.version>3.25.3</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
4 changes: 2 additions & 2 deletions examples/example-oauth/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protobufVersion = '3.25.1'
def protobufVersion = '3.25.3'
def protocVersion = protobufVersion

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
implementation "io.grpc:grpc-stub:${grpcVersion}"
implementation "io.grpc:grpc-auth:${grpcVersion}"
implementation "com.google.auth:google-auth-library-oauth2-http:1.18.0"
implementation "com.google.auth:google-auth-library-oauth2-http:1.23.0"

compileOnly "org.apache.tomcat:annotations-api:6.0.53"

Expand Down
6 changes: 3 additions & 3 deletions examples/example-oauth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protobuf.version>3.25.1</protobuf.version>
<protoc.version>3.25.1</protoc.version>
<protobuf.version>3.25.3</protobuf.version>
<protoc.version>3.25.3</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down Expand Up @@ -60,7 +60,7 @@
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>1.18.0</version>
<version>1.23.0</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
Expand Down
6 changes: 3 additions & 3 deletions examples/example-opentelemetry/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def openTelemetryVersion = '1.39.0'
def openTelemetryPrometheusVersion = '1.39.0-alpha'
def protocVersion = '3.25.3'
def openTelemetryVersion = '1.40.0'
def openTelemetryPrometheusVersion = '1.40.0-alpha'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-orca/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ java {
}

def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-reflection/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ java {
}

def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-servlet/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ java {
}

def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}",
Expand Down
2 changes: 1 addition & 1 deletion examples/example-tls/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ java {
// Feel free to delete the comment at the next line. It is just for safely
// updating the version in our release process.
def grpcVersion = '1.66.0-SNAPSHOT' // CURRENT_GRPC_VERSION
def protocVersion = '3.25.1'
def protocVersion = '3.25.3'

dependencies {
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
Expand Down
2 changes: 1 addition & 1 deletion examples/example-tls/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<grpc.version>1.66.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
<protoc.version>3.25.1</protoc.version>
<protoc.version>3.25.3</protoc.version>
<!-- required for jdk9 -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
Expand Down
Loading

0 comments on commit a977385

Please sign in to comment.