We're implementing a core library for a project that offers some common third-party libraries. I’m trying to define the Firebase platform BOM as an api dependency of an android library, but it doesn’t seem to be working, because the required Firebase plugins and libraries are missing in the final generated artifact.
This is a snippet of the build.gradle code used to define the dependencies:
implementation platform("com.google.firebase:firebase-bom:29.2.0")
api (""com.google.firebase:firebase-analytics-ktx")
api ("com.google.firebase:firebase-crashlytics-ktx")
api ("com.google.firebase:firebase-messaging-ktx")
Any of the defined Firebase libraries (Analytics, Crashlytics nor Messaging) are included into the final artifact, but the Firebase BoM does correctly, as can be seen in the following .pom snippet:
<dependencies>
<dependency>
<groupId>com.google.firebase</groupId>
<artifactId>firebase-bom</artifactId>
<version>29.2.0</version>
<scope>implementation</scope>
</dependency>
....
</dependencies>
Anyone knows how to apply the BoM in a transitive way correctly? Thanks in advance.