Publishing Lint results to Sonar using Gradle

♀尐吖头ヾ 提交于 2019-12-12 07:36:46

问题


I am trying to publish Lint results to a sonar server using Gradle. The other analysis results are published, but the Lint results are not. Does anyone have any experience getting this to work? I could not find any addition information.

The version of Sonar is 3.5.1 The version of Gradle is 1.10

The top level build file looks like this (there are 3 subprojects)

// Top-level build file where you can add configuration options common to all sub-projects/modules.

apply plugin: 'sonar-runner'

sonarRunner {
    sonarProperties {
        property "sonar.host.url", "*****"
        property "sonar.jdbc.url", "*****"
        property "sonar.jdbc.driverClassName", "oracle.jdbc.OracleDriver"
        property "sonar.jdbc.username", "*****"
        property "sonar.jdbc.password", "*****"


        property "sonar.projectKey", "ProView-Android"
        property "sonar.projectName", "ProView-Android"
        property "sonar.projectVersion", "1.0.0"
        property "sonar.profile", "Android Lint"
        }
}

subprojects {
    sonarRunner {
        sonarProperties {
            property "sonar.language", "java"
            property "sonar.sources", "src/main/java"
            property "sonar.binaries", "bin"
            property "sonar.profile", "Android Lint"
            property "sonar.sourceEncoding", "UTF-8"
        }
    }
}

来源:https://stackoverflow.com/questions/22261007/publishing-lint-results-to-sonar-using-gradle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!