Skip to content

Commit

Permalink
Working code coverage and exclusions on Sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoiosue committed Aug 14, 2020
1 parent a7d01da commit cfb925a
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ allprojects {
}

apply plugin: 'org.sonarqube'
def exclusionList = [
//Res and Assets
"**/src/main/res/**/*.*",
"**/src/main/assets/**/*.*",

//Auto-Generated
'**/**/R.class',
'**/**/R$*.class',
'**/**/BuildConfig.*',
'**/**/*Manifest.*',
'**/android/**/*.*',
'**/androidx/**/*.*',

//Tests
'**/src/test/**',
'**/src/androidTest/**'
]
sonarqube {
properties {
property "sonar.projectName", "Omni Notes"
Expand All @@ -52,7 +69,7 @@ sonarqube {
property "sonar.host.url", "https://sonarcloud.io"
property 'sonar.sourceEncoding', 'UTF-8'
property 'sonar.language', 'java'
property 'sonar.coverage.jacoco.xmlReportPaths', "omniNotes/build/jacoco/jacoco.xml"
property 'sonar.coverage.jacoco.xmlReportPaths', "**/jacoco/jacoco.xml"
property 'sonar.exclusions', exclusionList
}
}

0 comments on commit cfb925a

Please sign in to comment.