title: Google Cloud Artifact Registry for Gradle plugins
body: <p>I have successfully published to Artifact Registry, and I can use artifacts from there in &quot;normal&quot; use: <code>dependencies { implementation(&quot;mygroup:myartifact:myversion&quot;) }</code>.</p>
  <p>My issue is plugins. I have created a plugin. I can successfully publish it to Artifact Registry and also to Maven local. I can use it from Maven local, but I can't get my build script to take it from Artifact Registry.</p>
  <pre class="lang-kotlin prettyprint-override"><code>buildscript {
      repositories {
          maven(url = uri(&quot;artifactregistry://us-west1-maven.pkg.dev/glitchy-maven/repo&quot;))
      }
  }
  
  plugins {
      id(&quot;com.google.cloud.artifactregistry.gradle-plugin&quot;) version &quot;2.1.1&quot;
      id(&quot;com.glitchybyte.gradle.plugin.buildinfo&quot;) version &quot;1.0.0&quot;
      `java-library`
  }
  </code></pre>
  <p>And I get:</p>
  <pre><code>* What went wrong:
  Plugin [id: 'com.glitchybyte.gradle.plugin.buildinfo', version: '1.0.0'] was not found in any of the following sources:
  
  - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
  - Plugin Repositories (could not resolve plugin artifact 'com.glitchybyte.gradle.plugin.buildinfo:com.glitchybyte.gradle.plugin.buildinfo.gradle.plugin:1.0.0')
    Searched in the following repositories:
      Gradle Central Plugin Repository
  </code></pre>
  <p>So, it's not looking into Artifact Registry for plugins. I know I'm missing something, but I don't know what.</p>
  <p>...Update...</p>
  <p>I removed <code>buildscript</code> from <code>build.gradle.kts</code>, and instead I added this to <code>settings.gradle.kts</code>:</p>
  <pre class="lang-kotlin prettyprint-override"><code>pluginManagement {
      plugins {
          id(&quot;com.google.cloud.artifactregistry.gradle-plugin&quot;) version &quot;2.1.1&quot;
      }
      repositories {
          maven(url = uri(&quot;artifactregistry://us-west1-maven.pkg.dev/glitchy-maven/repo&quot;))
      }
  </code></pre>
  <p>And I get:</p>
  <pre><code>* What went wrong:
  Error resolving plugin [id: 'com.glitchybyte.gradle.plugin.buildinfo', version: '1.0.0']
  &gt; Could not resolve all dependencies for configuration 'detachedConfiguration1'.
     &gt; Not a supported repository protocol 'artifactregistry': valid protocols are [http, https, file, gcs, s3, sftp]
  </code></pre>