Right now we can configure plugin and dependency resolution repos in the project settings configs and developers love it.
Is there an idiomatic way to also centrally configure publication repos (short of burying them in a convention plugin)? I haven’t used Gradle in a while so I figured I should check here first
I guess it can be done by hooking every project’s plugin manager and customizing the publishing extension when maven-publish is detected:
Or possibly by configuring a bogus resolution repo and then doing:
What is wrong with doing it in a convention plugin?
That would exactly be the idiomatic way.
by hooking every project’s plugin manager and customizing the publishing extension when maven-publish
which you would do in a convention plugin, wouldn’t you?
Either a convention plugin that for example also applies maven-publish and does the configuration,
or a convention plugin that uses pluginManager.withPlugin("maven-publish") { ... } to react to the plugin being applied by some other means.
I would not declare a resolution repository just to then reuse it as publication repository, if that is even possible, I’m not sure about that.