This message was deleted.
# community-support
s
This message was deleted.
g
When settings plugin is running it's too late to set pluginManagement.repositories since it was already used to produce classpath to run settings script and settings plugins. You can move required logic to init script (one of possible variants is to create custom gradle distribution with an init script bundled). Adding repositories for project plugins should work though.
v
The question is, where do you get your settings plugin from? If the settings plugin is in your artifactory, then you need the
pluginManagement { repositories { ... } }
already for finding your custom settings plugin. I think a custom settings plugin could indeed add additional
pluginManagement
repositories if they are for project plugins, not for settings plugins, or maybe for settings plugins applied later than that one eventually, not sure about that. But what would then still not work is, that the
gradlePluginPortal()
is not added to the plugin management repositories as for that the adding in a settings plugin is too late.
g
It certainly works for project plugins. In my settings plugin
ws.gross.private-repo
I add internal nexus (with content filters),
mavenCentral
and
gradlePluginPortal
to the pluginManagement repositories and use plugins from the private nexus later.
But I created and published that plugin to the Plugin Portal to avoid setting private repository in each build's pluginManagement or using init script since there's a lot of projects where I don't need my internal repositories.