'Manage third-party optional dependencies in BOM

I develop some library and for end-user convenience I publish a BOM with my modules as dependencies. Now the question arised for transitive optional dependencies. For example I have support for both Paho MQTT v3 & v5. Therefore those are optional since we don't know what direct will choose end-user.

The concern is that users have to scan our build.gradle file to find the proper (compatible) version of that third-party library to add into their own project.

So, the question is: how is that good practice to add those transitive optional dependencies into my BOM for transparent (and compatible) versions management?

Or should I really consider to publish extra BOM with only those optional dependencies?

Again: the goal is to simplify end-user experience with my library and its dependencies.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source