Yes.
It’s not documented right now as it may be subject to change in the future, but there is a way to modify the dependencies that your plugin uses. The pluginBundle block has a withDependencies closure that you can use to modify the dependencies:
pluginBundle {
// etc
withDependencies { dependencies ->
dependencies.add(new Dependency(groupId: 'foo', artifactId: 'bar', version: '12.3', classifier: 'etc'))
}
}
It will be passed a List of org.apache.maven.model.Dependency. Exactly what gets passed in here is what may change in the future. But for the time being, you can add a new dependency to the list or remove dependencies that you don’t want in there in this closure.
You can’t add the repo automatically though, as we can’t modify end users’ repos to third party ones - this is a security risk.
Hope that solves the problem
Tom