title: Sonar, Gradle and Android returns 0 issue
body: <p><strong>The problem</strong></p>
  
  <p>I have an Android project that compiles and works correctly. It's "managed" by Gradle and continuously built with Jenkins. I would like to analyze my code quality with Sonar.</p>
  
  <p>The Sonar analysis is made with the <code>sonarRunner</code> Gradle task. The problem is that Sonar still telling me that there is "0 issue"... (I can ensure you that there are errors... I add one myself to be sure...). However, it gives me other information like : number of lines of code, number of classes, comments and documentation percentages, duplication percentage, complexity... It's like Android Lint was not running.</p>
  
  <p><strong>What I tried</strong></p>
  
  <p><code>lint</code> works like a charm... :</p>
  
  <blockquote>
    <p>Ran lint on variant armRelease: 153 issues found </p>
    
    <p>Ran lint on variant armDebug: 153 issues found</p>
    
    <p>Ran lint on variant x86Debug: 153 issues found</p>
    
    <p>Ran lint on variant x86Release: 153 issues found</p>
  </blockquote>
  
  <p>I tried a lot of thing that I read over the Internet and SO :</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/22261007/publishing-lint-results-to-sonar-using-gradle">Publishing Lint results to Sonar using Gradle</a></li>
  <li><a href="http://www.gradle.org/docs/current/userguide/sonar_runner_plugin.html" rel="nofollow noreferrer">http://www.gradle.org/docs/current/userguide/sonar_runner_plugin.html</a></li>
  <li><a href="https://github.com/stephanenicolas/Quality-Tools-for-Android/blob/master/build.gradle" rel="nofollow noreferrer">https://github.com/stephanenicolas/Quality-Tools-for-Android/blob/master/build.gradle</a></li>
  </ul>
  
  <p>I had some different errors like "Class 'android/content/res/Resources' is not accessible through the ClassLoader." or something else, but I never was able to have a correct report). </p>
  
  <p><strong>The details</strong></p>
  
  <p><em>Structure of the project</em></p>
  
  <pre><code>- myProjectName
      | build
      | libs
      | src
          | debug
          | main
              | assets
              | java
                  | com.myPackage...
              | jniLibs
              | res
              | AndroidManifest.xml
          | release
      | build.gradle
      | gradle.properties
      | settings.gradle
  </code></pre>
  
  <hr>
  
  <p><em>settings.gradle</em></p>
  
  <p>Empty</p>
  
  <hr>
  
  <p><em>gradle.properties</em></p>
  
  <p>Empty</p>
  
  <hr>
  
  <p><em>build.gradle</em> (useless parts removed)
  </p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.12.2'
      }
  }
  
  /**********************************
   * Plugins declarations
   **********************************/
  apply plugin: 'com.android.application'
  apply plugin: "sonar-runner"
  
  /**********************************
   * Sonar Runner configuration
   **********************************/
  sonarRunner {
      sonarProperties {
          property "sonar.host.url", "http://pic.url/sonar"
          property "sonar.jdbc.url", "jdbc:mysql://pic.url/sonar?useUnicode=true&amp;characterEncoding=utf8&amp;rewriteBatchedStatements=true"
          property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
          property "sonar.jdbc.username", "*****"
          property "sonar.jdbc.password", "*****"
  
          property "sonar.language", "java"
          property "sonar.profile", "MyCompany Android"
          property "sonar.projectVersion", "1.0"
          property "sonar.analysis.mode", "analysis"
  
          properties["sonar.sources"] = android.sourceSets.main.java.srcDirs
          properties["sonar.binaries"] = [file("build/intermediates/classes/x86/debug")]
      }
  }
  
  /**********************************
   * Android configuration
   **********************************/
  android {
      compileSdkVersion 20
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "com.myPackage..."
          minSdkVersion 14
          targetSdkVersion 16
          versionCode 1
          versionName "1.0"
      }
  
      lintOptions {
          abortOnError false
      }
  }
  </code></pre>
  
  <hr>
  
  <p>As I tried a lot of thing, I don't any clue on what to try next. Please ask in comments if you need more information.</p>
  
  <p>Last information :</p>
  
  <ul>
  <li>Sonar 3.7</li>
  <li>Gradle 1.12</li>
  <li>JVM 1.8.0_20 Oracle</li>
  <li>OS : Linux Fedora 20</li>
  </ul>
  
  <p><strong>EDIT</strong></p>
  
  <p><code>gradle sonarRunner</code> log (asked in comments) : <a href="http://pastebin.com/uJwqpAkY" rel="nofollow noreferrer">http://pastebin.com/uJwqpAkY</a></p>
  
  <p>(all the '***' are here to hide company names, everything is normal :))</p>