Usually Android Libraries do not require Analytics, that seems a red flag against usage of the library to me.
If you really require the data then there is no way around adding a transitive dependency I guess, since the firebase lib needs to be added to your android library.
One probable compromise might be to add the firebase analytics only to debug builds, but still I would advise against tracking anything inside of a library, libraries are not apps.