title: SonarQube integration with gradle
body: <p>I am integrating Sonar qube with gradle. I have mentioned plugin and required properties in app level build.gradle file.But command execution failed with exception. Please clarify what else required?</p>
  
  <p>Build.gradle :</p>
  
  <pre><code>        plugins {
                  id "org.sonarqube" version "2.6.1"
                  }
        sonarqube {
                  properties {
                  property "sonar.host.url", "http://192.168.22.12:9000/"
                  property "sonar.projectName", "ourValues-Android"
                  property "sonar.projectKey", "1234567"
                  property "sonar.projectVersion","8.0"
                  property "sonar.sources","src/main/java"
                  property "sonar.exclusions","build/**,**/*.png"
                  property "sonar.sourceEncoding", "UTF-8"
                  property "sonar.report.export.path", "sonar-report.json"
                  property "sonar.issuesReport.json.enable", "true"
                  property "sonar.import_unknown_files", true
                  property "sonar.android.lint.report", "./build/outputs/lint-
                  results.xml"
                  }
                }
  </code></pre>
  
  <p>Exception is when running command <strong>gradlew sonarqube</strong> :</p>
  
  <blockquote>
    <p>Execution failed for task ':app:sonarqube'.
    You must define the following mandatory properties for 'Unknown': sonar.projectKey, sonar.sources</p>
  </blockquote>
  
  <p>Please check the structure of project...</p>
  
  <p><a href="https://i.stack.imgur.com/6XzN6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6XzN6.png" alt="Structure Of Project"></a>               </p>