找不到ID为'com.github.spotbugs'的插件

naX*_*aXa 5 gradle spotbugs

我是第一次为Gradle项目配置SpotBugs插件

buildscript {
  repositories {
    maven {
      url 'https://plugins.gradle.org/m2/'
    }
  }
  dependencies {
    classpath 'gradle.plugin.com.github.spotbugs:spotbugs-gradle-plugin:1.6.6'
  }
}

apply plugin: 'com.github.spotbugs'
Run Code Online (Sandbox Code Playgroud)

运行时gradle check出现错误Plugin with id 'com.github.spotbugs' not found.我在做什么错?

Gradle版本5.0。