>1. We need to be able to tell the build system that it should only >lookup artifacts from a particular repository, the system wide one.
I don't think this would be a big problem. For ebuilds, they can just enable offline mode which would restrict maven/gradle from using remote artifacts. As gradle/maven dependency caches are on a per-user basis, the portage user would not encounter issues such as using a previously fetched artifact from the cache. >2. We need to be able to tell the build system to install it's artifacts >in a particular local repository, nowhere else. This would be hard for maven I think. But for gradle, init scripts could be installed to GRADLE_HOME/init.d/ by eselect-gradle which will add the local repository to publishing, plugins, and dependencies repos. See https://docs.gradle.org/current/userguide/init_scripts.html.