I want to get FirebaseApp from maven
in order to do:
com.google.firebase.FirestoreOptions firestoreOptions = FirestoreOptions.Builder() .setDatabaseUrl("xxx") .setCredentials(ServiceAccountCredentials.fromStream(serviceAccount)) .build(); com.google.firebase.FirebaseApp.initializeApp(firestoreOptions); but I don'k know which artifact to download
I have tried with:
<dependency> <groupId>com.google.firebase</groupId> <artifactId>firebase-admin</artifactId> <version>6.13.0</version> </dependency> but the builder has .setDatabaseId() instead of setDatabaseUrl()
as I see in the doc: https://firebase.google.com/docs/reference/admin/java/reference/com/google/firebase/FirebaseOptions.Builder#setDatabaseUrl(java.lang.String)
and the imports are
import com.google.cloud.firestore.Firestore; import com.google.cloud.firestore.FirestoreOptions; instead of
import com.google.firebase.Firestore; import com.google.firebase.FirestoreOptions;