In the new plugin mechanism, is there a way to specify repositories?

For an internal corporate application, I’d like to be able to convert my Gradle build over to using the new plugin mechanism exclusively, removing the existing ‘buildscript’ block. However, we have a requirement that our builds not directly download any external artifacts, instead downloading them by way of an internal proxy (Artifactory).

As far as I can tell, the new ‘plugins’ block doesn’t include any way to specify repositories to use. It looks to me like plugins specified via the new plugin mechanism might respect repositories declared in the ‘buildscript’ block (but without any way to tell it to not use the default repository?).

  1. Is there an existing way with Gradle to accommodate this requirement? 2) Once there is a way to accomplish this, I would like for Gradle’s documentation to include a section describing how to do so, including what the default repository is (so that artifact proxies can be configured to include it).

Currently, this is not supported. If your plugins are located in a private repository, you’ll have to use the old method of declaring your plugins in your build script. This is something we are looking to address in the future.