How do I depend on/publish the signed .jar instead of the unsigned .jar?

I have a custom jar signing task, which places it’s output in buildDir/signed, and I want all project dependencies to use the signed .jar file instead of the default unsigned .jar file.

In another topic Peter Niederwieser gives the following hint, only I don’t know how to actually do this:

I think it's better to create a separate artifact. Overwriting another task's output feels wrong to me. I'd rather reconfigure the project to, say, publish the signed artifact instead of the unsigned one. Also, there might still be some use for the unsigned artifact. I'd only consider overwriting if I hit a road block with this approach.

Any help would be much appreciated!