Small fix, added possibility to use closure as dependency config.

Signed-off-by: SeynovAM <sejnovalexey@gmail.com>