Affects Version/s: Master
Component/s: Dev Tools > Source Formatter
Backported to Branch:Committed
Hi Hugo and Greg,
While we're updating modules to minimize exports, we realized that it's easy to miss projects using release dependencies on older versions of modules that contain old exports. For example, if module foo-service used to export a package and we moved that export to foo-api, another module could have a dependency on an older version of foo-service and we forget to change that. This module will still compile and won't have any problems until it tries to use a new version and cannot find the export.
We'd like a new SF rule that scans the gradle dependencies of modules, translates those to the modules' file location, and then checks their bnd.bnd for exports. If a module has a dependency on a module that has no exports, that dependency should be removed. This only needs to apply to liferay dependencies.
We need this rule for 2 reasons:
1) To clean up dependencies on our side
2) To help customers transition their dependencies as we update more exports
On point 2, it would be good to have this logic in the Liferay IDE also. If we can't do that, though, we'll have a breaking changes listing all the tickets we've moved exports on.