How to download dependencies and keep remote directory structure?

I have a build.gradle with a task to download all dependencies to a local folder, but all jars end up in the same directory - I want the same remote directory structure locally as well.

Say the jar “kotlin-gradle-plugin.1.3.31.jar” would maybe end up in something like ./mydeps/org/jetbrains/kotlin/1.3.31/…

Is this possible?

Reading documentation on this simply only tells me how to get dependencies to a folder, can anyone point me to documentation that may help me at least?

thanks for putting the question here. I am looking for the same. did you find any way to achieve that?