Skip to content
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

Add storage module for JVM #4

Open
jakubkinst opened this issue Dec 27, 2023 · 10 comments
Open

Add storage module for JVM #4

jakubkinst opened this issue Dec 27, 2023 · 10 comments

Comments

@jakubkinst
Copy link

I would really appreciate storage module implementation for the JVM target. Is there any particular blocker for this one? Thanks

@nbransby
Copy link
Member

No blockers - ready for someone (such as yourself!) to pick up
https://github.com/GitLiveApp/firebase-java-sdk?tab=readme-ov-file#building-and-contributing

@nbransby nbransby transferred this issue from GitLiveApp/firebase-kotlin-sdk Feb 14, 2024
@CRamsan
Copy link

CRamsan commented Jun 13, 2024

I can help with this. 👍 Do you guys have a slack/discord for some quick questions? I wanted to run some questions before getting started. In the mean-time if something comes up, I can put it here.

@CRamsan
Copy link

CRamsan commented Jun 13, 2024

My goal is to be able to use Firebase Storage for a Compose Desktop app. So this would be my approach.

@nbransby
Copy link
Member

No that's exactly it 👍 you can post any issues you encounter here

@CRamsan
Copy link

CRamsan commented Jun 15, 2024

I see that in the build.gradle.kts, we are exposing all the classes from all the jars.

 api(fileTree(mapOf("dir" to "build/jar", "include" to listOf("*.jar"), "exclude" to listOf("lifecycle-*"))))

Is this required or can we have it just use implementation? Otherwise, all the jars will be added to the classpath and can very easily cause runtime exceptions even for components that are not firebase related.

For example, today I spent an hour investigating a crash in my navigation code. The crash was due to a missing method inside the JB Navigation due to the firebase-java-sdk exposing it's own version of several androidx.* dependencies.

@CRamsan
Copy link

CRamsan commented Jun 15, 2024

This is what I have so far #18 . I still need to do some more testing.

@nbransby
Copy link
Member

Yes it's required because the library consumers client code compiles and run directly against these android libraries, the code inside this project is an implementation of the android system using the standard java libraries required by the firebase libraries.

@CRamsan
Copy link

CRamsan commented Jun 15, 2024

I dont think we need all those classes though. Maybe it would be better to make it an include list for only the classes or packages that are required. Although I dont know how many those are 🤔 .
Otherwise, it will be a problem now that a lot of the AndroidX libraries are becoming multi-platform, and there will be classes that are androidx which will be used in the JVM target as part of those libraries.

@nbransby
Copy link
Member

nbransby commented Jun 16, 2024

Any library excluded from the jars will need to be added via a gradle implementation clause so the code will still compile and run

@CRamsan
Copy link

CRamsan commented Jun 20, 2024

My priorities had to change so I will not be needing the storage SDK anymore. Here are the changes I had started, the library loads but I am getting a 400 response when trying to download any file. Hopefully someone can take over and finish the rest.

Java-sdk changes: #18
Kotlin-sdk changes: branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants