Dependency injection in custom plugins and tasks


(Brian Keyser) #1

The Dependency Injection for Plugins Design Doc describes different approaches for enabling dependency injection within a plugin or task. I was wondering if there is any additional guidance for how a plugin or task could utilize dependency injection in its development and/or testing?


(David Burns) #2

Dependency Injection for Plugins Design Doc link is broken…

I’m looking for a simple guide to be able to @Inject a factory into a custom task constructor so that I can write a test for my plugin. The doc referenced sounds like the one I want, any other suggested resources?


(uklance) #3

You could use this approach