diff --git a/examples/gradle/libs.versions.toml b/examples/gradle/libs.versions.toml index 65074f5b..cdb1080c 100644 --- a/examples/gradle/libs.versions.toml +++ b/examples/gradle/libs.versions.toml @@ -1,8 +1,8 @@ [plugins] android-application = { id = "com.android.application", version = "8.2.2" } -android-library = { id = "com.android.library", version = "8.2.0" } +android-library = { id = "com.android.library", version = "8.2.2" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "1.9.22" } -kotlin-android = { id = "org.jetbrains.kotlin.android", version = "1.9.21" } +kotlin-android = { id = "org.jetbrains.kotlin.android", version = "1.9.22" } protobuf = { id = "com.google.protobuf", version = "0.9.4" } ktlint = { id = "org.jlleitschuh.gradle.ktlint", version = "12.1.0" } palantir-graal = { id = "com.palantir.graal", version = "0.12.0" } @@ -10,12 +10,12 @@ jib = { id = "com.google.cloud.tools.jib", version = "3.4.0" } [libraries] kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.7.3" } -grpc-protobuf = { group = "io.grpc", name = "grpc-protobuf", version = "1.60.0" } -grpc-protobuf-lite = { group = "io.grpc", name = "grpc-protobuf-lite", version = "1.60.0" } -grpc-netty = { group = "io.grpc", name = "grpc-netty", version = "1.60.0" } +grpc-protobuf = { group = "io.grpc", name = "grpc-protobuf", version = "1.62.2" } +grpc-protobuf-lite = { group = "io.grpc", name = "grpc-protobuf-lite", version = "1.62.2" } +grpc-netty = { group = "io.grpc", name = "grpc-netty", version = "1.62.2" } grpc-okhttp = { group = "io.grpc", name = "grpc-okhttp", version = "1.61.1" } -grpc-testing = { group = "io.grpc", name = "grpc-testing", version = "1.60.0" } -grpc-stub = { group = "io.grpc", name = "grpc-stub", version = "1.60.0" } +grpc-testing = { group = "io.grpc", name = "grpc-testing", version = "1.62.2" } +grpc-stub = { group = "io.grpc", name = "grpc-stub", version = "1.62.2" } grpc-kotlin-stub = { group = "io.grpc", name = "grpc-kotlin-stub", version = "1.4.1" } protoc = { group = "com.google.protobuf", name = "protoc", version = "3.25.1" } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 114031a9..9b5b0187 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,13 +11,16 @@ kotlin-power-assert = { id = "com.bnorm.power.kotlin-power-assert", version = "0 kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version = "1.7.3" } kotlinx-coroutines-core-jvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core-jvm", version = "1.7.3" } kotlinx-coroutines-debug = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-debug", version = "1.8.0" } -grpc-protobuf = { group = "io.grpc", name = "grpc-protobuf", version = "1.60.0" } -grpc-alts = { group = "io.grpc", name = "grpc-alts", version = "1.60.0" } +grpc-protobuf = { group = "io.grpc", name = "grpc-protobuf", version = "1.62.2" } +grpc-protobuf-lite = { group = "io.grpc", name = "grpc-protobuf-lite", version = "1.62.2" } +grpc-alts = { group = "io.grpc", name = "grpc-alts", version = "1.62.2" } grpc-auth = { group = "io.grpc", name = "grpc-auth", version = "1.62.2" } -grpc-netty = { group = "io.grpc", name = "grpc-netty", version = "1.60.0" } -grpc-okhttp = { group = "io.grpc", name = "grpc-okhttp", version = "1.60.0" } -grpc-testing = { group = "io.grpc", name = "grpc-testing", version = "1.60.0" } -grpc-stub = { group = "io.grpc", name = "grpc-stub", version = "1.60.0" } +grpc-netty = { group = "io.grpc", name = "grpc-netty", version = "1.62.2" } +grpc-okhttp = { group = "io.grpc", name = "grpc-okhttp", version = "1.62.2" } +grpc-testing = { group = "io.grpc", name = "grpc-testing", version = "1.62.2" } +grpc-stub = { group = "io.grpc", name = "grpc-stub", version = "1.62.2" } +grpc-inprocess = { group = "io.grpc", name = "grpc-inprocess", version = "1.62.2" } +protoc-gen-grpc-java = { group = "io.grpc", name = "protoc-gen-grpc-java", version = "1.62.2" } kotlinpoet = { group = "com.squareup", name = "kotlinpoet", version = "1.16.0" } junit = { group = "junit", name = "junit", version = "4.13.2" } junit-platform-launcher = { group = "org.junit.platform", name = "junit-platform-launcher", version = "1.10.2" } @@ -30,10 +33,12 @@ junit-jupiter-engine = { group = "org.junit.jupiter", name = "junit-jupiter-engi mockito-core = { group = "org.mockito", name = "mockito-core", version = "4.11.0" } protoc = { group = "com.google.protobuf", name = "protoc", version = "3.25.3" } protobuf-java = { group = "com.google.protobuf", name = "protobuf-java", version = "3.25.3" } -protoc-gen-grpc-java = { group = "io.grpc", name = "protoc-gen-grpc-java", version = "1.61.1" } truth = { group = "com.google.truth", name = "truth", version = "1.4.1" } truth-proto-extension = { group = "com.google.truth.extensions", name = "truth-proto-extension", version = "1.4.1" } okhttp = { group = "com.squareup.okhttp", name = "okhttp", version = "2.7.5" } javax-annotation-api = { group = "javax.annotation", name = "javax.annotation-api", version = "1.3.2" } testcontainers = { group = "org.testcontainers", name = "testcontainers", version = "1.19.6" } slf4j-simple = { group = "org.slf4j", name = "slf4j-simple", version = "2.0.12" } +gradle-test-kit = { group = "org.gradle", name = "gradle-test-kit", version = "6.1" } +gradle-tooling-api = { group = "org.gradle", name = "gradle-tooling-api", version = "8.6" } +commons-io = { group = "commons-io", name = "commons-io", version = "2.15.1" } diff --git a/integration_testing/build.gradle.kts b/integration_testing/build.gradle.kts index 6c82e732..5d5640ab 100644 --- a/integration_testing/build.gradle.kts +++ b/integration_testing/build.gradle.kts @@ -11,10 +11,9 @@ kotlin { dependencies { testImplementation(libs.testcontainers) - testImplementation("org.gradle:gradle-test-kit:6.1") - testImplementation("org.gradle:gradle-test-kit:6.1") - testImplementation("commons-io:commons-io:2.15.1") - testImplementation("org.gradle:gradle-tooling-api:8.6") + testImplementation(libs.gradle.test.kit) + testImplementation(libs.gradle.tooling.api) + testImplementation(libs.commons.io) testImplementation(libs.junit.jupiter) testRuntimeOnly(libs.junit.platform.launcher) testRuntimeOnly(libs.slf4j.simple) diff --git a/interop_testing/build.gradle.kts b/interop_testing/build.gradle.kts index 58b97df8..d2c33adc 100644 --- a/interop_testing/build.gradle.kts +++ b/interop_testing/build.gradle.kts @@ -11,6 +11,7 @@ dependencies { implementation(project(":stub")) implementation(libs.grpc.protobuf) + implementation(libs.grpc.protobuf.lite) implementation(libs.grpc.auth) implementation(libs.grpc.alts) implementation(libs.grpc.netty) diff --git a/interop_testing/src/test/java/io/grpc/stub/StubConfigTest.java b/interop_testing/src/test/java/io/grpc/stub/StubConfigTest.java index 833a49b7..aa918b4f 100644 --- a/interop_testing/src/test/java/io/grpc/stub/StubConfigTest.java +++ b/interop_testing/src/test/java/io/grpc/stub/StubConfigTest.java @@ -22,15 +22,9 @@ import static org.junit.Assert.assertNull; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.same; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; +import static org.mockito.Mockito.*; -import io.grpc.CallOptions; -import io.grpc.Channel; -import io.grpc.ClientCall; -import io.grpc.Deadline; -import io.grpc.MethodDescriptor; -import io.grpc.internal.NoopClientCall; +import io.grpc.*; import io.grpc.testing.integration.Messages.SimpleRequest; import io.grpc.testing.integration.Messages.SimpleResponse; import io.grpc.testing.integration.TestServiceGrpc; @@ -54,13 +48,15 @@ public class StubConfigTest { @Mock private StreamObserver responseObserver; + @Mock + private ClientCall call; + /** * Sets up mocks. */ @Before public void setUp() { MockitoAnnotations.openMocks(this); - ClientCall call = - new NoopClientCall<>(); + when(channel.newCall( ArgumentMatchers.>any(), any(CallOptions.class))) diff --git a/stub/build.gradle.kts b/stub/build.gradle.kts index a631df1e..1e288cc6 100644 --- a/stub/build.gradle.kts +++ b/stub/build.gradle.kts @@ -32,6 +32,7 @@ dependencies { testImplementation(libs.truth.proto.extension) testImplementation(libs.grpc.protobuf) testImplementation(libs.grpc.testing) + testImplementation(libs.grpc.inprocess) } java {