firebase / firebase-admin-java

Firebase Admin Java SDK
https://firebase.google.com/docs/admin/setup
Apache License 2.0
525 stars 255 forks source link

Doesnt build on a java >= 9 modular project #792

Open Meithal opened 1 year ago

Meithal commented 1 year ago

[REQUIRED] Step 2: Describe your environment

[REQUIRED] Step 3: Describe the problem

I want to have a project to use JavaFX so I need the module system to work. With a module-info.java at the root of the code, having a import com.google.firebase.FirebaseApp; won't even work if you don't add a requires firebase.admin in the module declaration.

But then you get hundreds of errors

Steps to reproduce:

Remarks

A fix for this is to state that this SDK works on Java 8 exclusively and isn't compatible with JavaFX https://github.com/firebase/firebase-admin-java#supported-java-versions

An fix for end users is suggested here https://medium.com/@ygge/firebase-in-java-9-with-modules-9a4eb99cffcb

A hack to have JavaFX working on a non modular java project is explained here : https://edencoding.com/runtime-components-error/

google-oss-bot commented 1 year ago

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.