Suggestions on using Dependency Injection in large plugin suite

plugins

(Willie) #1

I am working on a very large suite of plugins for an enterprise level build and deploy system. Im beginning parts of this suite where the builds have to integrate into other systems and its getting a bit out of hand.

I’ve been using the @singleton annotation for things like config settings and interface managers to other systems in our enterprise, but its proving to be a nightmare to unit test. I would like to scrap that model and switch everything to some DI system. I found the old docs about building a DI system into gradle, but from all accounts, it appears that idea was never completed.

So my question is, has anyone tried/had problems with taking say Guice, and using that to implement DI in a very large plugin suite. This is a group of 30 or so plugins, that are all designed to work primarily in multi-project builds.

I’m taking a shot asking here first because I don’t want to get 4 days into it and find out some weird project scoping thing blows up the whole model.