dependency-analysis-gradle-plugin
dependency-analysis-gradle-plugin copied to clipboard
Feature Request: Advice on modules that could/should be combined
Is your feature request related to a problem? Please describe.
Sometimes when you modularize a codebase the final structure is not clear and you might "over-modularize", meaning things that should be in a single module are separated into multiple modules
Describe the solution you'd like Would like the plugin to give advice on which module are good candidates for combining into a single module.
a couple of heuristics on when you might want to combine modules:
- when any given module depends on
Ait also depends on moduleBXX% (configurable) of the time, and vice versa. - module
Aand moduleBapply the same (or mostly the same) plugins ("mostly same" should be configurable) - module
Aand moduleBhave the same (or mostly the same) dependencies ("mostly same" should be configurable) - module
Aand moduleBare less than NNN (configurable) lines of code when combined (don't want to create huge modules)
if some combination of those things are true, then "combineModuleAdvice" should propose combining module A and B
Additional context
I generally like to start with smallest modules possible, see what structure emerges, and then combine modules that are similar.
Thanks for the issue. This is an interesting idea, and is why the primary task of the plugin is buildHealth and not findBadDependencies or something. I'm not sure when I might have time to work on it, but I like it conceptually.