How to handle run-time dependencies

First an important question: Why don’t you just use the gradle run task or the distributions built by the application plugin? They will work out of the box without any manifest or classpath magic.

Only If you really want a fat jar with inlined dependencies, have a look at the shadow plugin or this stackoverflow question.

This will resolve the dependencies at configuration time, making all your builds slower, don’t do this. See this forum post for an explanation and solution.

Why are you doing this?

This is the default behavior, no need to repeat it.