How to configure sonarqube plugin in gradle

Hi I’m trying to setup sonar plugin for my project but unable to do so.

Script:

buildscript {
repositories {
maven {
url “https://plugins.gradle.org/m2/
}
}
dependencies {
classpath “org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:1.2”
}
}

apply plugin: “org.sonarqube”

Please help me to configure this.

When asking a question about how to do something, please include details on what you’ve tried and how it failed, or you’ll just end up getting a link to the documentation.

Also, please read up on the forum documentation on how to format inline code.