This message was deleted.
# dependency-management
s
This message was deleted.
v
I have no idea, never used S3. But what I can say is that
finalizedBy
is proabably a bad idea. It is executed always, even if the publish task failed. If you need to do the custom work, you probably better add a
doLast { ... }
action to the existing task that publishes the file, so that it is done as additional action if it otherwise was successful already.
a
Oh shit, I had no idea finalizedBy had that behaviour. Does dependsOn do that? If B depends on A, B will get skipped if A fails, yea?
Customising doLast of the publish task sounds like a way better approach. I keep forgetting about that hook. That really helps, thanks @Vampire
v
Yes, actually you could probably also make it
dependsOn
and
finalizedBy
. Then it should be automatically triggered, but only if it was successful.
a
The dependsOn and finalizedBy duality sounds like a bit of a hack to get that behaviour. I think in this case doLast is 100% the way to go. No need to add to the task graph if not really needed.
👌 1
c
a few ideas: 1. unclear whether there is a readily available hook for ‘onPublish’ to then perform tagging - perhaps a wander through the Gradle source may help there; 2. Add S3 event handler lambda to catch each artifact as it’s provided and add tags (this may not be feasible as the context for tagging is limited to the key)
l
back to the original question: there is currently no hooks to modify publishing remote calls. Though this is a request we have seen in the past.