-
Notifications
You must be signed in to change notification settings - Fork 274
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
Is protobuf-kotlin-lite a Kotlin equivalent of protobuf-javalite? #499
Comments
This repo is just for the gradle plugin; this seems a question better suited to the protobuf or protobuf-kotlin projects although in this case I think the problem isn't even with those projects. "Duplicate class" means that there is ambiguity for which class should be used. jetified-protobuf-javalite seems to duplicate the classes of protobuf-javalite, so you can only have a dependency on one of those two libraries. I'm not familiar with the jetified version, but it is clearly causing trouble. It seems protobuf-kotlin-lite depends on the normal protobuf-javalite. I'd assume you have some other dependency (not shown in the code snippet) that is bringing in the jetified version which is causing your pain. I don't know who created the jetified version, but I'm very disappointed to see it. |
@ejona86 From what I found out, the only |
I don't know why there are jetifier versions of these binaries. I've not really used jetifier. |
I've got that set up as the part of android project. Now I am using only androidx libraries, so Jetifier shouldn't be necessary. Anyways, I disabled Jetifier, which made those duplication errors disappear, but now it seems that protobuf isn't generating the Kotlin file for the original message defined in
I can see generated I haven't find anything special regarding syntax in proto file or gradle compiler. |
So I looked into protobuf repo here on Github and there is already this issue (protocolbuffers/protobuf#8631). This one thus might be closed, it really isn't issue of gradle plugin. Thanks for help anyways! |
Hi guys,
basically, the question is in the title. I was following Google's codelab on Android DataStore backed by protocol buffers and they use
-javalite
artifact for protobuf.Firstly, I set up the configuration as in the codelab (java bindings), but after a while, I noticed that Kotlin is also supported. So I updated the dependencies and replaced
protobuf-javalite
withprotobuf-kotlin-lite:3.17.0
. The modifiedbuild.gradle
is as follows:However, on build, I am getting errors like these:
and so on.
Am I doing something wrong? Isn't
kotlin-lite
an equivalent ofjavalite
?The text was updated successfully, but these errors were encountered: