Now that gRPC migrated to protobuf-javalite in grpc-java 1.26, it's possible for Firebase SDKs to also migrate to protobuf-javalite.
We'll need to upgrade all SDKs at once because protobuf-lite and protobuf-javalite cannot coexist.
Firestore's upgrade is tracked internally as b/147754660.
Please migrate firebase-config also to javalite.
Hey Folks,
We are in the process of moving out SDKs over to the newer version of the lite runtime. Given the variables involved, we wanted to share an early preview and get the community's help to determine if they work.
Please try these alpha versions (protolite-m2repository.zip) out and write back to us
implementation 'com.google.firebase:firebase-abt:19.1.0-alpha'
implementation 'com.google.firebase:firebase-config:19.2.0-alpha'
implementation 'com.google.firebase:firebase-firestore:21.5.0-alpha'
implementation 'com.google.firebase:firebase-inappmessaging:19.1.0-alpha'
implementation 'com.google.firebase:firebase-inappmessaging-display:19.1.0-alpha'
We strongly recommend that you do not ship these to prod until we have critical mass on their stability.
For those of you struggling with making gradle to read the artifacts from that zip - I've extracted the zip to the local maven folder (~/.m2/repository) and then define mavenLocal() in the list of maven repositories in the root build.gradle
Maybe there is easier way but I could not find it :(
I am still having an issue with well-known-types dependency. My build crashes on
Type com.google.api.Advice$1 is defined multiple times: /Users/.../.gradle/caches/transforms-2/files-2.1/982202ec476637b557c1857d9a5f7eb2/jetified-protolite-well-known-types-17.1.0-runtime/classes.dex, /Users/.../projects/.../app/build/intermediates/external_file_lib_dex_archives/devApiDebug/out/0_jetified-firebase-well-known-types.jar:classes.dex
I thought that the goal is to get rid of firebase-well-known-types dependency as well. But when I exclude this dependency from firebase dependencies the app works which is the progress because with older versions it crashed due to some runtime compatibility problems with missing dynamic methods.
I am still having an issue with
well-known-typesdependency. My build crashes onType com.google.api.Advice$1 is defined multiple times: /Users/.../.gradle/caches/transforms-2/files-2.1/982202ec476637b557c1857d9a5f7eb2/jetified-protolite-well-known-types-17.1.0-runtime/classes.dex, /Users/.../projects/.../app/build/intermediates/external_file_lib_dex_archives/devApiDebug/out/0_jetified-firebase-well-known-types.jar:classes.dexI thought that the goal is to get rid of
firebase-well-known-typesdependency as well. But when I exclude this dependency from firebase dependencies the app works which is the progress because with older versions it crashed due to some runtime compatibility problems with missing dynamic methods.
Thanks for the report.
The goal is not to get rid of that dependency. Unfortunately it is required even with this alpha build that we have provided.
Can you share the output of .\gradle :app:dependencies without the exclusion, so we can understand why you are having these issues?
For those of you struggling with making gradle to read the artifacts from that zip - I've extracted the zip to the local maven folder (
~/.m2/repository) and then definemavenLocal()in the list of maven repositories in the rootbuild.gradleMaybe there is easier way but I could not find it :(
repositories {
maven {
url 'file://D:/path/to/local/directory'
}
}
I am still having an issue with
well-known-typesdependency. My build crashes onType com.google.api.Advice$1 is defined multiple times: /Users/.../.gradle/caches/transforms-2/files-2.1/982202ec476637b557c1857d9a5f7eb2/jetified-protolite-well-known-types-17.1.0-runtime/classes.dex, /Users/.../projects/.../app/build/intermediates/external_file_lib_dex_archives/devApiDebug/out/0_jetified-firebase-well-known-types.jar:classes.dexI thought that the goal is to get rid of
firebase-well-known-typesdependency as well. But when I exclude this dependency from firebase dependencies the app works which is the progress because with older versions it crashed due to some runtime compatibility problems with missing dynamic methods.Thanks for the report.
The goal is not to get rid of that dependency. Unfortunately it is required even with this alpha build that we have provided.Can you share the output of
.\gradle :app:dependencieswithout the exclusion, so we can understand why you are having these issues?
It looks like I've left some workaround repackaged dependencies in the classpath that caused this conflict, after removing this and clean rebuild app now works correctly 馃帀 So great job! Looking forward to stable release :)
@davidbilik we'd also appreciate your confirmation that the app works as expected after proguarding, if you do proguard your app.
@ashwinraghav I am using proguard and it looks like it works correctly :)
Thanks for the confirmation @davidbilik !
HI @rlazo I can see that this issue is closed now, do you have any estimate when the new version will be released in stable channel? :)
Hi @davidbilik it should be released early next week.
One important note about the coming release:
Since protobuf-javalite includes the same classes as protobuf-lite, SDKs that depend on one cannot be mixed with SDKs that depend on the other.
In practice it means that these SDKs need to be updated together to their latest versions:
- com.google.firebase:firebase-firestore:21.5.0
- com.google.firebase:firebase-inappmessaging:19.1.0
- com.google.firebase:firebase-inappmessaging-display:19.1.0
- com.google.firebase:firebase-config:19.2.0
- com.google.firebase:firebase-abt:19.1.0
Most helpful comment
Please migrate
firebase-configalso to javalite.