-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Kotlin Android and JVM protos #245
Conversation
Copy configuration from the grpc kotlin stub lite example to generate kotlin code for android and jvm. Remove old kotlin messages generation and publication.
@nand4011 are the issues in the original PR description resolved? |
publications { | ||
create<MavenPublication>("maven") { | ||
from(components["java"]) | ||
artifactId = rootProject.name + "-android" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do the final coordinates end up looking like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
software.momento.kotlin:client-protos-jvm
and software.momento.kotlin:client-protos-android
. I matched the existing pattern for the java protos: software.momento.java:client-protos
.
@cprice404 Both issues are still open. There has been no comment on the webhook bug I reported with the protobuf project. I was hoping that would be fast enough that it would be fixed before releasing this, but no dice. If necessary, I can leave the old kotlin protos in place. They are under a different module and they can still be published to the internal repo without disturbing this work. |
I don't think you need to maintain the old version, I just need to understand the implications here before we merge. It sounds like: (a) we had to vendor some google protos, and maybe if other projects are trying to use our SDK and also use other grpc libraries, there may be a conflict between the 2 versions of said protos? and |
Only generate Java request and response classes. The Kotlin methods use the Java requests anyway, so there is no reason for the Kotlin request classes to exist. This sidesteps the webhook kotlin bug.
I discovered that we don't need the kotlin version of the webhook class, so there is no issue there anymore. I updated the pr. |
Copy configuration from the grpc kotlin stub lite example to generate kotlin code for android and jvm.
Remove old kotlin messages generation and publication.
I needed to include google/protobuf/descriptor.proto because there is no lite version of google common protos:
protocolbuffers/protobuf#7331
protocolbuffers/protobuf#1889
That comment was made last week, so this is an ongoing issue. I don't see a good way of guaranteeing that libraries that use java-lite/kotlin-lite won't clash with each other other than trying to shade the generated code.