I think it take alot of time to put each repository into the code to download all dependencies even there is a Gradle plugin for it.
So basically, it should be a good approach to include the repositories (even it's a private with credentials) into the runtimeDownload.txt from GradleScript.