In a multi project build I can declare a dependency on another build in a subproject build.gradle file as
project compile(':projectA')
which I can translate into the following in a plugin
project.dependencies.add("compile", project.parent.findProject("projectA"))
If I want to specify a configuration on the dependency in the build.gradle I can use
compile project(path: ':projectA', configuration: 'testUtilRuntime')
but I cannot work out how to specify this in a plugin. Please help.
I tried using a DefaultProjectDependencyFactory.create(), amongst other things, but that expects a ProjectInternal and the findProject returns a DefaultProject