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:
Create a java project in intellij with the javaFX preset,
add implementation ('com.google.firebase:firebase-admin:9.1.1') in the build.gradle
add requires firebase.admin in the module-info.java
try to build
hundreds of errors of the kind the unnamed module reads package com.google.longrunning from both gax.grpc and proto.google.common.protos
[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 aimport com.google.firebase.FirebaseApp;
won't even work if you don't add arequires firebase.admin
in the module declaration.But then you get hundreds of errors
Steps to reproduce:
implementation ('com.google.firebase:firebase-admin:9.1.1')
in the build.gradlerequires firebase.admin
in themodule-info.java
the unnamed module reads package com.google.longrunning from both gax.grpc and proto.google.common.protos
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/