This message was deleted.
# community-support
s
This message was deleted.
t
You could declare that task from an init script so it's kept separate from the Gradle projects' themselves.
v
And if you do not do it via init script, but external script, it is probably better to use the result of
outgoingArtifacts
task, as - if I got you right - you are not actually interested in the group and project name, but in the produced artifact coordinates. Those can differ, even if in most cases they are the same.
d
Since I'm looking to do an artifact promotion into a releases repository but it's not directly writable instead need to execute a command that tells the repository which namespace (groupId), package (artifactId), and verison to retrieve to make available.
Looks like
OUTPUT=$(./gradlew outgoingVariants --variant runtimeElements --console plain | grep -A1 "^Capabilities" | tail -n1 | xargs | cut -d' ' -f2)
might get me what I want, but I can certainly see that it might be better to add a task for this to just output the capability information of interest and then that can be parsed in a script to split it into the fields
<groupId>:<artifactId>:<version>
which would be ideal
👌 1