mirror of https://github.com/grpc/grpc-java.git
Upgrade dependencies post v1.57.x branch cut (#10359)
### Dependency updates #### Update successfully to the latest - [x] `androidx.core:core 1.10.0 -> 1.10.1` - [x] `com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0` - [x] `com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5` - [x] `com.google.truth:truth 1.0.1 -> 1.1.5` - [x] `com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1` - [x] `org.robolectric:robolectric 4.9.2 -> 4.10.3` - [x] Auto-value - [x] `com.google.auto.value:auto-value 1.10.1 -> 1.10.2` - [x] `com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2` - [x] Protobuf - [x] `com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4` - [x] `com.google.protobuf:protoc 3.22.3 -> 3.23.4` - [x] Errorprone - [x] `com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0` - [x] `com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0` - ~`libs.checkstylejava8 = com.puppycrawl.tools:checkstyle 9.3 -> 10.12.1`~ -- pinned to last version supporting java8, update not needed #### Updated to non-latest - [x] `com.squareup.okio:okio 1.17.5 ->` ~`3.4.0`~ `2.10.0` -- updating to 3.x failed due to them [introducing gradle multiplatform artifacts](https://github.com/square/okio/blob/master/CHANGELOG.md#version-320). Error in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632853307.). - [x] `org.checkerframework:checker-qual 3.33.0 ->` ~`3.36.0`~ -- removed, no longer needed - [x] Mockito - updated to `4.11.0`. Versions 5.x break some tests. Errors in [the comment below](https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435). - `org.mockito:mockito-android 3.12.4 ->` ~`5.4.0`~ `4.11.0` - `org.mockito:mockito-core 3.12.4 ->` ~`5.4.0`~ `4.11.0` #### Not updated - Cronet -- upgrade failed, created a blocker ticket https://github.com/grpc/grpc-java/issues/10396 - ~`org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61`~ - ~`org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61`~ - Google auth -- upgrade blocked by https://github.com/grpc/grpc-java/pull/9118 - ~`com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0`~ - ~`com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0`~ - Guava -- not upgraded: 32.1.0 [broke gradle modules](https://github.com/google/guava/releases/tag/v32.1.0) - ~`libs.guava = com.google.guava:guava 32.0.1-android -> 32.1.1-jre`~ - ~`libs.guava.jre = com.google.guava:guava 32.0.1-jre -> 32.1.1-jre`~ - ~`libs.guava.testlib = com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre`~ ### checkForUpdates results ``` > Task :checkForUpdates androidx.core:core 1.10.0 -> 1.10.1 com.google.auto.value:auto-value 1.10.1 -> 1.10.2 com.google.auto.value:auto-value-annotations 1.10.1 -> 1.10.2 org.checkerframework:checker-qual 3.33.0 -> 3.36.0 com.puppycrawl.tools:checkstyle 8.28 -> 10.12.1 org.chromium.net:cronet-api 108.5359.79 -> 113.5672.61 org.chromium.net:cronet-embedded 108.5359.79 -> 113.5672.61 com.google.errorprone:error_prone_annotations 2.18.0 -> 2.20.0 com.google.errorprone:error_prone_core 2.18.0 -> 2.20.0 com.google.errorprone:error_prone_core 2.10.0 -> 2.20.0 com.google.api.grpc:proto-google-common-protos 2.17.0 -> 2.22.0 com.google.auth:google-auth-library-credentials 1.4.0 -> 1.19.0 com.google.auth:google-auth-library-oauth2-http 1.4.0 -> 1.19.0 com.google.cloud:google-cloud-logging 3.14.5 -> 3.15.5 com.google.guava:guava 32.0.1-android -> 32.1.1-jre com.google.guava:guava 32.0.1-jre -> 32.1.1-jre com.google.guava:guava-testlib 32.0.1-android -> 32.1.1-jre org.mockito:mockito-android 3.12.4 -> 5.4.0 org.mockito:mockito-core 3.12.4 -> 5.4.0 com.squareup.okio:okio 1.17.5 -> 3.4.0 com.google.protobuf:protobuf-java 3.22.3 -> 3.23.4 com.google.protobuf:protobuf-java-util 3.22.3 -> 3.23.4 com.google.protobuf:protobuf-javalite 3.22.3 -> 3.23.4 com.google.protobuf:protoc 3.22.3 -> 3.23.4 org.robolectric:robolectric 4.9.2 -> 4.10.3 com.google.truth:truth 1.0.1 -> 1.1.5 ```
This commit is contained in:
parent
9f78b2bd3c
commit
419767f968
|
@ -129,7 +129,7 @@ For protobuf-based codegen integrated with the Maven build system, you can use
|
|||
<artifactId>protobuf-maven-plugin</artifactId>
|
||||
<version>0.6.1</version>
|
||||
<configuration>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.22.3:exe:${os.detected.classifier}</protocArtifact>
|
||||
<protocArtifact>com.google.protobuf:protoc:3.23.4:exe:${os.detected.classifier}</protocArtifact>
|
||||
<pluginId>grpc-java</pluginId>
|
||||
<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.56.0:exe:${os.detected.classifier}</pluginArtifact>
|
||||
</configuration>
|
||||
|
@ -157,7 +157,7 @@ plugins {
|
|||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = "com.google.protobuf:protoc:3.22.3"
|
||||
artifact = "com.google.protobuf:protoc:3.23.4"
|
||||
}
|
||||
plugins {
|
||||
grpc {
|
||||
|
@ -190,7 +190,7 @@ plugins {
|
|||
|
||||
protobuf {
|
||||
protoc {
|
||||
artifact = "com.google.protobuf:protoc:3.22.3"
|
||||
artifact = "com.google.protobuf:protoc:3.23.4"
|
||||
}
|
||||
plugins {
|
||||
grpc {
|
||||
|
|
|
@ -571,10 +571,10 @@ public abstract class ManagedChannelBuilder<T extends ManagedChannelBuilder<T>>
|
|||
* return o;
|
||||
* }}</pre>
|
||||
*
|
||||
* @return this
|
||||
* @throws IllegalArgumentException When the given serviceConfig is invalid or the current version
|
||||
* of grpc library can not parse it gracefully. The state of the builder is unchanged if
|
||||
* an exception is thrown.
|
||||
* @return this
|
||||
* @since 1.20.0
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/5189")
|
||||
|
|
|
@ -313,6 +313,7 @@ public class MetadataTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("StringCaseLocaleUsage") // System locale is exactly what we're testing.
|
||||
public void testKeyCaseHandling() {
|
||||
Locale originalLocale = Locale.getDefault();
|
||||
Locale.setDefault(new Locale("tr", "TR"));
|
||||
|
|
|
@ -54,15 +54,13 @@ public class StatusRuntimeExceptionTest {
|
|||
@Test
|
||||
public void extendAndOverridePreservesStack() {
|
||||
final StackTraceElement element = new StackTraceElement("a", "b", "c", 4);
|
||||
StatusRuntimeException exception =
|
||||
new StatusRuntimeException(Status.CANCELLED, new Metadata()) {
|
||||
|
||||
StatusRuntimeException error = new StatusRuntimeException(Status.CANCELLED, new Metadata()) {
|
||||
@Override
|
||||
public synchronized Throwable fillInStackTrace() {
|
||||
setStackTrace(new StackTraceElement[]{element});
|
||||
return this;
|
||||
}
|
||||
};
|
||||
assertThat(exception.getStackTrace()).asList().containsExactly(element);
|
||||
assertThat(error.getStackTrace()).asList().containsExactly(element);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,6 +78,7 @@ public abstract class AbstractBenchmark {
|
|||
SMALL(10), MEDIUM(1024), LARGE(65536), JUMBO(1048576);
|
||||
|
||||
private final int bytes;
|
||||
|
||||
MessageSize(int bytes) {
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
@ -94,6 +95,7 @@ public abstract class AbstractBenchmark {
|
|||
SMALL(16383), MEDIUM(65535), LARGE(1048575), JUMBO(8388607);
|
||||
|
||||
private final int bytes;
|
||||
|
||||
FlowWindowSize(int bytes) {
|
||||
this.bytes = bytes;
|
||||
}
|
||||
|
|
10
build.gradle
10
build.gradle
|
@ -162,7 +162,8 @@ subprojects {
|
|||
|
||||
checkstyle {
|
||||
configDirectory = file("$rootDir/buildscripts")
|
||||
toolVersion = libs.checkstyle.get().version
|
||||
toolVersion = JavaVersion.current().isJava11Compatible() ? libs.checkstyle.get().version : libs.checkstylejava8.get().version
|
||||
|
||||
ignoreFailures = false
|
||||
if (rootProject.hasProperty("checkstyle.ignoreFailures")) {
|
||||
ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean()
|
||||
|
@ -245,6 +246,11 @@ subprojects {
|
|||
options.errorprone.check("JavaUtilDate", CheckSeverity.OFF)
|
||||
// The warning fails to provide a source location
|
||||
options.errorprone.check("MissingSummary", CheckSeverity.OFF)
|
||||
|
||||
// TODO(https://github.com/grpc/grpc-java/issues/10372): remove when fixed.
|
||||
if (JavaVersion.current().isJava11Compatible()) {
|
||||
options.errorprone.check("StringCaseLocaleUsage", CheckSeverity.OFF)
|
||||
}
|
||||
}
|
||||
tasks.named("compileTestJava").configure {
|
||||
// LinkedList doesn't hurt much in tests and has lots of usages
|
||||
|
@ -573,7 +579,7 @@ tasks.register('checkForUpdates') {
|
|||
if (oldResolved != newResolved) {
|
||||
def oldId = oldResolved.id.componentIdentifier
|
||||
def newId = newResolved.id.componentIdentifier
|
||||
println("${newId.group}:${newId.module} ${oldId.version} -> ${newId.version}")
|
||||
println("libs.${name} = ${newId.group}:${newId.module} ${oldId.version} -> ${newId.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="scope" value="public"/>
|
||||
<property name="accessModifiers" value="public"/>
|
||||
<property name="allowMissingParamTags" value="true"/>
|
||||
<property name="allowMissingReturnTag" value="true"/>
|
||||
<!-- TOOD(ejona): Too restrictive for tests
|
||||
|
|
|
@ -140,7 +140,7 @@ public class DelayedClientCall<ReqT, RespT> extends ClientCall<ReqT, RespT> {
|
|||
buf.append(String.format(Locale.US, ".%09d", nanos));
|
||||
buf.append("s. ");
|
||||
|
||||
/** Cancels the call if deadline exceeded prior to the real call being set. */
|
||||
/* Cancels the call if deadline exceeded prior to the real call being set. */
|
||||
class DeadlineExceededRunnable implements Runnable {
|
||||
@Override
|
||||
public void run() {
|
||||
|
|
|
@ -32,7 +32,7 @@ android {
|
|||
}
|
||||
|
||||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ android {
|
|||
}
|
||||
|
||||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ android {
|
|||
}
|
||||
|
||||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ android {
|
|||
}
|
||||
|
||||
protobuf {
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.22.3' }
|
||||
protoc { artifact = 'com.google.protobuf:protoc:3.23.4' }
|
||||
plugins {
|
||||
grpc { artifact = 'io.grpc:protoc-gen-grpc-java:1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.22.3'
|
||||
def protobufVersion = '3.23.4'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
// grpc-alts transitively depends on grpc-netty-shaded, grpc-protobuf, and grpc-stub
|
||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.22.3'
|
||||
def protobufVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.22.3</protoc.version>
|
||||
<protoc.version>3.23.4</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.22.3'
|
||||
def protobufVersion = '3.23.4'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.22.3</protobuf.version>
|
||||
<protobuf.version>3.23.4</protobuf.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -25,7 +25,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -22,7 +22,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.22.3'
|
||||
def protobufVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.22.3</protoc.version>
|
||||
<protoc.version>3.23.4</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -23,7 +23,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protobufVersion = '3.22.3'
|
||||
def protobufVersion = '3.23.4'
|
||||
def protocVersion = protobufVersion
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.22.3</protobuf.version>
|
||||
<protoc.version>3.22.3</protoc.version>
|
||||
<protobuf.version>3.23.4</protobuf.version>
|
||||
<protoc.version>3.23.4</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -18,7 +18,7 @@ sourceCompatibility = 1.8
|
|||
targetCompatibility = 1.8
|
||||
|
||||
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -18,7 +18,7 @@ sourceCompatibility = 1.8
|
|||
targetCompatibility = 1.8
|
||||
|
||||
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -16,7 +16,7 @@ sourceCompatibility = 1.8
|
|||
targetCompatibility = 1.8
|
||||
|
||||
def grpcVersion = '1.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}",
|
||||
|
|
|
@ -24,7 +24,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protoc.version>3.22.3</protoc.version>
|
||||
<protoc.version>3.23.4</protoc.version>
|
||||
<!-- required for jdk9 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -23,7 +23,7 @@ targetCompatibility = 1.8
|
|||
// 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.58.0-SNAPSHOT' // CURRENT_GRPC_VERSION
|
||||
def protocVersion = '3.22.3'
|
||||
def protocVersion = '3.23.4'
|
||||
|
||||
dependencies {
|
||||
implementation "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<grpc.version>1.58.0-SNAPSHOT</grpc.version><!-- CURRENT_GRPC_VERSION -->
|
||||
<protobuf.version>3.22.3</protobuf.version>
|
||||
<protoc.version>3.22.3</protoc.version>
|
||||
<protobuf.version>3.23.4</protobuf.version>
|
||||
<protoc.version>3.23.4</protoc.version>
|
||||
<!-- required for JDK 8 -->
|
||||
<maven.compiler.source>1.8</maven.compiler.source>
|
||||
<maven.compiler.target>1.8</maven.compiler.target>
|
||||
|
|
|
@ -20,8 +20,6 @@ tasks.named("compileJava").configure {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
def cloudLoggingVersion = '3.14.5'
|
||||
|
||||
annotationProcessor libraries.auto.value
|
||||
api project(':grpc-api')
|
||||
|
||||
|
@ -32,7 +30,7 @@ dependencies {
|
|||
project(':grpc-census'),
|
||||
libraries.opencensus.contrib.grpc.metrics
|
||||
// Avoid gradle using project dependencies without configuration: shadow
|
||||
implementation ("com.google.cloud:google-cloud-logging:${cloudLoggingVersion}") {
|
||||
implementation (libraries.google.cloud.logging) {
|
||||
exclude group: 'io.grpc', module: 'grpc-alts'
|
||||
exclude group: 'io.grpc', module: 'grpc-netty-shaded'
|
||||
exclude group: 'io.grpc', module: 'grpc-xds'
|
||||
|
@ -57,10 +55,10 @@ dependencies {
|
|||
project(':grpc-grpclb'), // Align grpc versions
|
||||
project(':grpc-services'), // Align grpc versions
|
||||
libraries.animalsniffer.annotations, // Use our newer version
|
||||
libraries.auto.value.annotations, // Use our newer version
|
||||
libraries.guava.jre, // Use our newer version
|
||||
libraries.protobuf.java.util, // Use our newer version
|
||||
libraries.re2j, // Use our newer version
|
||||
libraries.checker.qual, // Explicit dependency to keep in step with version used by guava
|
||||
libraries.j2objc.annotations // Explicit dependency to keep in step with version used by guava
|
||||
|
||||
testImplementation testFixtures(project(':grpc-api')),
|
||||
|
|
|
@ -2,18 +2,28 @@
|
|||
# Compatibility problem with internal version getting onto 1.5.3.
|
||||
# https://github.com/grpc/grpc-java/pull/9118
|
||||
googleauth = "1.4.0"
|
||||
guava = "32.0.1-android"
|
||||
# Update notes / 2023-07-19 sergiitk:
|
||||
# Couldn't update to 32.1.1 because Guava 32.1.0 broke gradle metadata:
|
||||
# https://github.com/google/guava/releases/tag/v32.1.0
|
||||
# 32.1.1 partially fixed this, but our build still breaks with:
|
||||
# Could not resolve com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava.
|
||||
#
|
||||
# TODO(any release manager): attempt removing runtimeOnly dependencies when guava upgraded:
|
||||
# - okhttp: errorprone.annotations
|
||||
#
|
||||
# Allowed to be different from guava-jre.
|
||||
guava = '32.0.1-android'
|
||||
netty = '4.1.94.Final'
|
||||
# Keep the following references of tcnative version in sync whenever it's updated:
|
||||
# SECURITY.md
|
||||
nettytcnative = '2.0.61.Final'
|
||||
opencensus = "0.31.1"
|
||||
protobuf = "3.22.3"
|
||||
protobuf = "3.23.4"
|
||||
|
||||
[libraries]
|
||||
android-annotations = "com.google.android:annotations:4.1.1.4"
|
||||
androidx-annotation = "androidx.annotation:annotation:1.6.0"
|
||||
androidx-core = "androidx.core:core:1.10.0"
|
||||
androidx-core = "androidx.core:core:1.10.1"
|
||||
androidx-lifecycle-common = "androidx.lifecycle:lifecycle-common:2.6.1"
|
||||
androidx-lifecycle-service = "androidx.lifecycle:lifecycle-service:2.6.1"
|
||||
androidx-test-core = "androidx.test:core:1.5.0"
|
||||
|
@ -21,24 +31,26 @@ androidx-test-ext-junit = "androidx.test.ext:junit:1.1.5"
|
|||
androidx-test-rules = "androidx.test:rules:1.5.0"
|
||||
animalsniffer = "org.codehaus.mojo:animal-sniffer:1.23"
|
||||
animalsniffer-annotations = "org.codehaus.mojo:animal-sniffer-annotations:1.23"
|
||||
auto-value = "com.google.auto.value:auto-value:1.10.1"
|
||||
auto-value-annotations = "com.google.auto.value:auto-value-annotations:1.10.1"
|
||||
checker-qual = "org.checkerframework:checker-qual:3.33.0"
|
||||
checkstyle = "com.puppycrawl.tools:checkstyle:8.28"
|
||||
auto-value = "com.google.auto.value:auto-value:1.10.2"
|
||||
auto-value-annotations = "com.google.auto.value:auto-value-annotations:1.10.2"
|
||||
checkstyle = "com.puppycrawl.tools:checkstyle:10.12.1"
|
||||
commons-math3 = "org.apache.commons:commons-math3:3.6.1"
|
||||
conscrypt = "org.conscrypt:conscrypt-openjdk-uber:2.5.2"
|
||||
cronet-api = "org.chromium.net:cronet-api:108.5359.79"
|
||||
cronet-embedded = "org.chromium.net:cronet-embedded:108.5359.79"
|
||||
errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.18.0"
|
||||
errorprone-corejava8 = "com.google.errorprone:error_prone_core:2.10.0"
|
||||
errorprone-core = "com.google.errorprone:error_prone_core:2.18.0"
|
||||
google-api-protos = "com.google.api.grpc:proto-google-common-protos:2.17.0"
|
||||
errorprone-annotations = "com.google.errorprone:error_prone_annotations:2.20.0"
|
||||
errorprone-core = "com.google.errorprone:error_prone_core:2.20.0"
|
||||
google-api-protos = "com.google.api.grpc:proto-google-common-protos:2.22.0"
|
||||
google-auth-credentials = { module = "com.google.auth:google-auth-library-credentials", version.ref = "googleauth" }
|
||||
google-auth-oauth2Http = { module = "com.google.auth:google-auth-library-oauth2-http", version.ref = "googleauth" }
|
||||
# Release notes: https://cloud.google.com/logging/docs/release-notes
|
||||
google-cloud-logging = "com.google.cloud:google-cloud-logging:3.15.5"
|
||||
gson = "com.google.code.gson:gson:2.10.1"
|
||||
guava = { module = "com.google.guava:guava", version.ref = "guava" }
|
||||
guava-betaChecker = "com.google.guava:guava-beta-checker:1.0"
|
||||
guava-testlib = { module = "com.google.guava:guava-testlib", version.ref = "guava" }
|
||||
# JRE version is needed for projects where its a transitive dependency, f.e. gcp-observability.
|
||||
# May be different from the -android version.
|
||||
guava-jre = "com.google.guava:guava:32.0.1-jre"
|
||||
hdrhistogram = "org.hdrhistogram:HdrHistogram:2.1.12"
|
||||
javax-annotation = "org.apache.tomcat:annotations-api:6.0.53"
|
||||
|
@ -46,8 +58,11 @@ j2objc-annotations = " com.google.j2objc:j2objc-annotations:2.8"
|
|||
jetty-alpn-agent = "org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.10"
|
||||
jsr305 = "com.google.code.findbugs:jsr305:3.0.2"
|
||||
junit = "junit:junit:4.13.2"
|
||||
mockito-android = "org.mockito:mockito-android:3.12.4"
|
||||
mockito-core = "org.mockito:mockito-core:3.12.4"
|
||||
# Update notes / 2023-07-19 sergiitk:
|
||||
# Couldn't update to 5.4.0, updated to the last in 4.x line. Version 5.x breaks some tests.
|
||||
# Error log: https://github.com/grpc/grpc-java/pull/10359#issuecomment-1632834435
|
||||
mockito-android = "org.mockito:mockito-android:4.11.0"
|
||||
mockito-core = "org.mockito:mockito-core:4.11.0"
|
||||
netty-codec-http2 = { module = "io.netty:netty-codec-http2", version.ref = "netty" }
|
||||
netty-handler-proxy = { module = "io.netty:netty-handler-proxy", version.ref = "netty" }
|
||||
netty-tcnative = { module = "io.netty:netty-tcnative-boringssl-static", version.ref = "nettytcnative" }
|
||||
|
@ -55,7 +70,7 @@ netty-tcnative-classes = { module = "io.netty:netty-tcnative-classes", version.r
|
|||
netty-transport-epoll = { module = "io.netty:netty-transport-native-epoll", version.ref = "netty" }
|
||||
netty-unix-common = { module = "io.netty:netty-transport-native-unix-common", version.ref = "netty" }
|
||||
okhttp = "com.squareup.okhttp:okhttp:2.7.5"
|
||||
okio = "com.squareup.okio:okio:1.17.5"
|
||||
okio = "com.squareup.okio:okio:2.10.0"
|
||||
opencensus-api = { module = "io.opencensus:opencensus-api", version.ref = "opencensus" }
|
||||
opencensus-contrib-grpc-metrics = { module = "io.opencensus:opencensus-contrib-grpc-metrics", version.ref = "opencensus" }
|
||||
opencensus-exporter-stats-stackdriver = { module = "io.opencensus:opencensus-exporter-stats-stackdriver", version.ref = "opencensus" }
|
||||
|
@ -68,10 +83,13 @@ protobuf-java-util = { module = "com.google.protobuf:protobuf-java-util", versio
|
|||
protobuf-javalite = { module = "com.google.protobuf:protobuf-javalite", version.ref = "protobuf" }
|
||||
protobuf-protoc = { module = "com.google.protobuf:protoc", version.ref = "protobuf" }
|
||||
re2j = "com.google.re2j:re2j:1.7"
|
||||
# Compilation failed with 4.10.2 due to native graphics, or something. We don't
|
||||
# use it, but it seemed the compiler felt it needed the definition
|
||||
robolectric = "org.robolectric:robolectric:4.9.2"
|
||||
robolectric = "org.robolectric:robolectric:4.10.3"
|
||||
signature-android = "net.sf.androidscents.signature:android-api-level-19:4.4.2_r4"
|
||||
signature-java = "org.codehaus.mojo.signature:java18:1.0"
|
||||
# 1.1+ requires Java 8, but we still use Java 7 with grpc-context
|
||||
truth = "com.google.truth:truth:1.0.1"
|
||||
truth = "com.google.truth:truth:1.1.5"
|
||||
|
||||
# Do not update: Pinned to the last version supporting Java 8.
|
||||
# See https://checkstyle.sourceforge.io/releasenotes.html#Release_10.1
|
||||
checkstylejava8 = "com.puppycrawl.tools:checkstyle:9.3"
|
||||
# See https://github.com/google/error-prone/releases/tag/v2.11.0
|
||||
errorprone-corejava8 = "com.google.errorprone:error_prone_core:2.10.0"
|
||||
|
|
|
@ -272,9 +272,7 @@ class NettyServer implements InternalServer, InternalWithLogId {
|
|||
transportListener = listener.transportCreated(transport);
|
||||
}
|
||||
|
||||
/**
|
||||
* Releases the event loop if the channel is "done", possibly due to the channel closing.
|
||||
*/
|
||||
/* Releases the event loop if the channel is "done", possibly due to the channel closing. */
|
||||
final class LoopReleaser implements ChannelFutureListener {
|
||||
private boolean done;
|
||||
|
||||
|
|
|
@ -15,6 +15,12 @@ dependencies {
|
|||
libraries.perfmark.api
|
||||
// Make okhttp dependencies compile only
|
||||
compileOnly libraries.okhttp
|
||||
|
||||
// Needed because com.google.guava:guava:32.0.1-android requires
|
||||
// com.google.errorprone:error_prone_annotations version 2.18.0, while we are running newer.
|
||||
// TODO(any release manager): remove when guava is updated
|
||||
runtimeOnly libraries.errorprone.annotations
|
||||
|
||||
// Tests depend on base class defined by core module.
|
||||
testImplementation testFixtures(project(':grpc-core')),
|
||||
testFixtures(project(':grpc-api')),
|
||||
|
|
|
@ -11,20 +11,20 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
|||
# )
|
||||
IO_GRPC_GRPC_JAVA_ARTIFACTS = [
|
||||
"com.google.android:annotations:4.1.1.4",
|
||||
"com.google.api.grpc:proto-google-common-protos:2.17.0",
|
||||
"com.google.api.grpc:proto-google-common-protos:2.22.0",
|
||||
"com.google.auth:google-auth-library-credentials:1.4.0",
|
||||
"com.google.auth:google-auth-library-oauth2-http:1.4.0",
|
||||
"com.google.auto.value:auto-value-annotations:1.10.1",
|
||||
"com.google.auto.value:auto-value:1.10.1",
|
||||
"com.google.auto.value:auto-value-annotations:1.10.2",
|
||||
"com.google.auto.value:auto-value:1.10.2",
|
||||
"com.google.code.findbugs:jsr305:3.0.2",
|
||||
"com.google.code.gson:gson:2.10.1",
|
||||
"com.google.errorprone:error_prone_annotations:2.18.0",
|
||||
"com.google.errorprone:error_prone_annotations:2.20.0",
|
||||
"com.google.guava:failureaccess:1.0.1",
|
||||
"com.google.guava:guava:32.0.1-android",
|
||||
"com.google.re2j:re2j:1.7",
|
||||
"com.google.truth:truth:1.0.1",
|
||||
"com.google.truth:truth:1.1.5",
|
||||
"com.squareup.okhttp:okhttp:2.7.5",
|
||||
"com.squareup.okio:okio:1.17.5",
|
||||
"com.squareup.okio:okio:2.10.0",
|
||||
"io.netty:netty-buffer:4.1.94.Final",
|
||||
"io.netty:netty-codec-http2:4.1.94.Final",
|
||||
"io.netty:netty-codec-http:4.1.94.Final",
|
||||
|
@ -143,18 +143,18 @@ def com_google_protobuf():
|
|||
# This statement defines the @com_google_protobuf repo.
|
||||
http_archive(
|
||||
name = "com_google_protobuf",
|
||||
sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0",
|
||||
strip_prefix = "protobuf-22.3",
|
||||
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"],
|
||||
sha256 = "ac3fd4e97af55405d8bfba43c22d8a7e464a371bb6bc9e706627b745c1022dbf",
|
||||
strip_prefix = "protobuf-23.4",
|
||||
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.zip"],
|
||||
)
|
||||
|
||||
def com_google_protobuf_javalite():
|
||||
# java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite
|
||||
http_archive(
|
||||
name = "com_google_protobuf_javalite",
|
||||
sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0",
|
||||
strip_prefix = "protobuf-22.3",
|
||||
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"],
|
||||
sha256 = "ac3fd4e97af55405d8bfba43c22d8a7e464a371bb6bc9e706627b745c1022dbf",
|
||||
strip_prefix = "protobuf-23.4",
|
||||
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v23.4/protobuf-23.4.zip"],
|
||||
)
|
||||
|
||||
def io_grpc_grpc_proto():
|
||||
|
|
|
@ -383,8 +383,9 @@ final class ControlPlaneClient {
|
|||
void start() {
|
||||
AggregatedDiscoveryServiceGrpc.AggregatedDiscoveryServiceStub stub =
|
||||
AggregatedDiscoveryServiceGrpc.newStub(channel);
|
||||
StreamObserver<DiscoveryResponse> responseReader =
|
||||
new ClientResponseObserver<DiscoveryRequest,DiscoveryResponse>() {
|
||||
|
||||
final class AdsClientResponseObserver
|
||||
implements ClientResponseObserver<DiscoveryRequest, DiscoveryResponse> {
|
||||
|
||||
@Override
|
||||
public void beforeStart(ClientCallStreamObserver<DiscoveryRequest> requestStream) {
|
||||
|
@ -434,8 +435,9 @@ final class ControlPlaneClient {
|
|||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
requestWriter = stub.streamAggregatedResources(responseReader);
|
||||
}
|
||||
|
||||
requestWriter = stub.streamAggregatedResources(new AdsClientResponseObserver());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -49,9 +49,9 @@ public final class CertificateUtils {
|
|||
|
||||
private static CertificateFactory factory;
|
||||
private static final Pattern KEY_PATTERN = Pattern.compile(
|
||||
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" + // Header
|
||||
"([a-z0-9+/=\\r\\n]+)" + // Base64 text
|
||||
"-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
|
||||
"-+BEGIN\\s+.*PRIVATE\\s+KEY[^-]*-+(?:\\s|\\r|\\n)+" // Header
|
||||
+ "([a-z0-9+/=\\r\\n]+)" // Base64 text
|
||||
+ "-+END\\s+.*PRIVATE\\s+KEY[^-]*-+", // Footer
|
||||
Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private static synchronized void initInstance() throws CertificateException {
|
||||
|
|
|
@ -122,8 +122,8 @@ final class XdsTestControlPlaneService extends
|
|||
@Override
|
||||
public StreamObserver<DiscoveryRequest> streamAggregatedResources(
|
||||
final StreamObserver<DiscoveryResponse> responseObserver) {
|
||||
final StreamObserver<DiscoveryRequest> requestObserver =
|
||||
new StreamObserver<DiscoveryRequest>() {
|
||||
|
||||
final class AdsStreamObserver implements StreamObserver<DiscoveryRequest> {
|
||||
@Override
|
||||
public void onNext(final DiscoveryRequest value) {
|
||||
syncContext.execute(new Runnable() {
|
||||
|
@ -176,8 +176,9 @@ final class XdsTestControlPlaneService extends
|
|||
xdsNonces.get(type).remove(responseObserver);
|
||||
}
|
||||
}
|
||||
};
|
||||
return requestObserver;
|
||||
}
|
||||
|
||||
return new AdsStreamObserver();
|
||||
}
|
||||
|
||||
//must run in syncContext
|
||||
|
|
|
@ -137,8 +137,8 @@ public class OrcaMetricReportingServerInterceptorTest {
|
|||
@Test
|
||||
public void shareCallMetricRecorderInContext() throws IOException {
|
||||
final CallMetricRecorder callMetricRecorder = new CallMetricRecorder();
|
||||
ServerStreamTracer.Factory callMetricRecorderSharingStreamTracerFactory =
|
||||
new ServerStreamTracer.Factory() {
|
||||
ServerStreamTracer.Factory callMetricRecorderSharingStreamTracerFactory;
|
||||
callMetricRecorderSharingStreamTracerFactory = new ServerStreamTracer.Factory() {
|
||||
@Override
|
||||
public ServerStreamTracer newServerStreamTracer(String fullMethodName, Metadata headers) {
|
||||
return new ServerStreamTracer() {
|
||||
|
|
Loading…
Reference in New Issue