I have a problem whereby I would like to switch between a local ivy repository for publishing to a “public” one, depending upon whether I am doing a release or not. I am using the new ivy-publish interface.
Now, how would I do that if I want to locate this code to a plugin, which is perhaps only applied in the root project?
The problem appears to me to be that declaring publishing repositories happen at configuration time, but I cannot query the taskgraph until it is ready, which is then at execution time? Now, if I communicate the target repo via an external property I have to have it set to the local default and then change it afterwards when I have interrogated the taskgraph, but I don’t see it changing to the public repo … rather it is always stuck with the local default I had initially.
invocation would be gradlew release :subproject:publish
I assume a closure solution is what I need but I am not clear on how to do that in this case.