Last active
January 12, 2020 13:27
-
-
Save azizbekian/623069a262abfe3552d5c72b1b162fcc to your computer and use it in GitHub Desktop.
sonar.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: "org.sonarqube" | |
sonarqube { | |
properties { | |
property "sonar.host.url", "https://sonarqube.yourcompany.com" | |
property "sonar.login", "your fancy key" | |
property "sonar.projectName", "Your Awesome Project Name" | |
property "sonar.projectKey", "my-test-project" | |
property "sonar.projectVersion", "1.0.0" | |
property "sonar.sourceEncoding", "UTF-8" | |
property "sonar.java.coveragePlugin", "jacoco" | |
// taken from `jacoco.gradle` | |
property "sonar.coverage.exclusions", "**/test/**,**/androidTest/**,**/R.class,**/BuildConfig.*,**/Manifest*.*,**/*Test*.*,**/com/example/databinding/*,**/com/example/generated/callback/*,**/*Dto*.*,**/android/databinding/*,**/androidx/databinding/*,**/di/module/*,**/*MapperImpl*.*,**/BuildConfig.*,**/*Component*.*,**/*BR*.*,**/Manifest*.*,**/*Companion*.*,**/*Module.*,**/*Dagger*.*,**/*MembersInjector*.*,**/*Extensions*.*,**/InputMethodManagerLeaks.*,**/*_Factory*.*,**/*_Provide*Factory*.*" | |
} | |
} | |
// task named `testDevDebugUnitTestCoverage` is created inside `jacoco.gradle` | |
tasks.sonarqube.dependsOn ":app:testDevDebugUnitTestCoverage" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment