grpc-kotlin
grpc-kotlin copied to clipboard
compilation error after upgrading grpc-java to 1.40.1 io.grpc.stub.annotations.GrpcGenerated
I am getting compilation error after upgrading grpc version from 1.39.0 to 1.40.1
looks like they added io.grpc.stub.annotations.GrpcGenerated which is missing in grpc-kotlin which depends on grpc-java 1.36.0
Error
/generated/source/proto/main/grpc/micro/apps/proto/order/v1/ProductServiceGrpc.java:13: error: cannot find symbol
@io.grpc.stub.annotations.GrpcGenerated
^
symbol: class GrpcGenerated
location: package io.grpc.stub.annotations
is there a way to force grpc-kotlin to use grpc-java 1.40.1 version?

You need to manually add the grpc-stub dependency, like:
implementation("io.grpc:grpc-stub:1.40.1")
We should look at bumping our deps to fix this.
@jamesward Hi, after update my gradle to https://github.com/grpc/grpc-kotlin/blob/master/examples/stub-android/build.gradle.kts and added implementation("io.grpc:grpc-stub:1.40.1"), I got inferred type is [My proto model class] but Serializable? was expected error. Why does GeneratedMessageLite not extend from Serializable any more?
Note sure. Maybe @lowasser knows. Also you may want to try a newer version than that.