I created a convenient plugin to address the SSH source dependency issues:
https://plugins.gradle.org/plugin/io.github.aquinney0.ssh-cmd-proxy
This fixes the feature instead of trying to create a custom way of downloading and building repositories and has proper IDE support in addition to supporting modern SSH configuration features.