We have a couple of locally developed groovy buildSrc plugins that have external implementation dependencies. We host those dependencies within local maven repositories.
If we use includeBuild for the plugin we currently have to duplicate these external repositories within a pluginManagement block for the projects using our plugins (or not use includeBuild but symlink the plugin directory as buildSrc for the project).
plugin build.gradle:
plugins {
id ‘example-plugin’
}
dependencies {
repositories {
maven {
url = …
}
maven {
url = …
}
}
implementation ‘com.example:example:1.2.3’
}
consumer project settings.gradle:
pluginManagement {
repositories {
maven {
url = …
}
maven {
url = …
}
}
}
includeBuild ‘path/to/example-plugin’
If not duplicated we get an error like so:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project ‘xxx’.
Could not resolve all dependencies for configuration ‘classpath’.
Could not resolve com.example:example:1.2.3.
Required by:
root project : > project :plugins
Could not resolve com.example:example:1.2.3.
Could not get resource 'https://plugins.gradle.org/…
Could not GET 'https://plugins.gradle.org/m2/…
*snip*
It seems like since these are internal implementation dependencies for the plugins we should not have to duplicate the repositories for the projects using the plugins? We are using 8.14.2