I’ve written a plugin that adds dependencies using...
# plugin-development
p
I’ve written a plugin that adds dependencies using the
DependencyResolutionListener.beforeResolve
callback. However in my unit test I can’t get the listener to be fired? I was following this example here: https://github.com/saadfarooq/gradle-common-deps-plugin/blob/85b45122807720bb87f6f[…]c/test/groovy/com/github/saadfarooq/CommonDepsPluginTest.groovy and I noticed they use
project.evaluate()
which was an internal call and I don’t think is available any longer. How can I get the
DependencyResolutionListener
to be called from a unit test that uses
ProjectBuilder.builder().build()
pls?
I found evaluate() 😄
(project as DefaultProject).evaluate()
but that doesn’t make the Listener get called 🤔
I got rid of the
DependencyResolutionListener
and used
project.dependencies.add()
directly in my plugins apply method 🤷