Skip to content

Instantly share code, notes, and snippets.

@realdadfish
Created September 26, 2014 11:59
Show Gist options
  • Save realdadfish/835578507024105fac82 to your computer and use it in GitHub Desktop.
Save realdadfish/835578507024105fac82 to your computer and use it in GitHub Desktop.
apply plugin: "sonar-runner"
sonarRunner {
sonarProperties {
// connectivity
property "sonar.host.url", "http://your.server/sonar"
property "sonar.jdbc.url", "jdbc:mysql://..."
property "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver"
property "sonar.jdbc.username", "..."
// project configuration
property "sonar.projectName", "My App"
property "sonar.projectKey", "my-app"
// source tests and binaries
properties["sonar.sources"] = android.sourceSets.main.java.srcDirs
properties["sonar.tests"] = android.sourceSets.androidTest.java.srcDirs
properties["sonar.binaries"] = file("build/intermediates/classes/debug")
// instrumentation tests
property "sonar.junit.reportsPath", "build/outputs/androidTest-results/connected/"
// code coverage
property "sonar.core.codeCoveragePlugin", "jacoco"
property "sonar.jacoco.reportPath", "build/outputs/code-coverage/connected/coverage.ec"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment