title: Analysing sonar with gradle
body: <p>we are pretty much impressed with working of sonarqube with Java projects and planning to go for next level by analyzing Android projects. we have <code>Sonarqube version-5.6.6</code> and <code>gradle-2.8</code>. Below is my configuration added for our android projects build.gradle. </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> dependencies {
      classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.1"
    }
    
    sonar {
      server {
          url = "http:sonar-url.com"
      }
   }
  
  apply plugin: "sonar"</code></pre>
  </div>
  </div>
  </p>
  
  <p>this is issue popping up when I run <code>gradle sonar</code></p>
  
  <p><code>Could not find method sonar() for arguments [build_2gg1yf48v6l7ngh099813mf0i$_run_closure1$_closure4@61d34b4] on root project 'project name'.</code></p>