Shaded jar from maven dependency copied to a certain directory


I am trying to create an executable jar file based on two libraries (maven jar dependencies, not executable) and it’s transitive dependecies. I want to copy this with a certain name to a certain directory. I did this in maven with this code:

     <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">

How do I do this with gradle? I am spending already quite a time with the shadow plugin or the zip plugin, without success.