Can't apply org.sonarqube plugin when using Artifactory cache

At little context: We use TeamCity to do our build and we are behind a corporate proxy, so all of our dependencies are mirrored/cached on an internal Artifactory instance. TeamCity doesn’t have proxy access, so all dependencies for our builds HAVE to be on Artifactory.

I was trying to upgrade our build to use the new org.sonarqube plugin, since the old one is deprecated. I was able to do this locally using the repository, but obviously I can’t do this on TeamCity.

I have verified that the gradle sonarqube plugin has been cached on Artifactory, however, when the build runs it complains:

Plugin with id ‘org.sonarqube’ not found.

Here is what the relevant sections of my build.gradle looks like:

buildscript {
  repositories {
    maven {
      url ""

  dependencies {
    classpath 'org.sonarqube.gradle:gradle-sonarqube-plugin:1.0'

apply plugin: 'org.sonarqube'

Am I doing something wrong here, or is this potentially a bug?