Are we using platforms the right way?


we are maintaining an ee framework for our internal projects. This framework is splitted in different bitbucket repos
(framework, frameworkcore, frameworkservice) and is used in different projects. Every repo contains a multi project build.

These projects which use this ee framework are assembled from different modules, every module hosted in one bitbucket repos is a multi project build.
We have used spring-dependency-plugin to define versions in every multi project build at one place for both own artifacts
and dependent BOMs (like Jboss boms). I want to migrate this to the new platform feature of gradle to minimize third party dependencies of plugins. We have the following scenarios, were I’d like to know if this is best done with this feature:

  1. Each project module defines its platform were every follow up module defines the platform from previous modules AND
    versions of the own artifacts. The platform is defined in a subproject per project module and is distributed via
    publish-maven plugin.
    This works well as long I take care to always use exactly one version of the jboss boms. As soon as I am using different versions of a jboss bom in different platforms it comes to very strange effects leading to endless loops.
    But this could be mastered by a convention that only the base module contains boms in its platform and every follow up build uses them and don’t import boms themselves.

  2. I want to build the framework repos in the same way (using platform feature) but don’t want to distribute any constraints
    because the framework is used in multiple projects using different versions of jboss. So I’d like to use a platform for the
    own build but don’t want to distribute any version infos regarding the jboss boms. This infos should be handled by base module of each project itself

After facing error of endless loops I’d like to check if the things we do make sense to you, if we are using platform the way they were intended to be used and want to ask how to solve the scenario 2 (don’t distribute version infos at all)

Any infos would be nice.

Any opinions out there?