Created
November 5, 2023 06:30
-
-
Save smoralb/04940a10951f47da06b7d0e308168a6f to your computer and use it in GitHub Desktop.
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' | |
apply from : "../reports/jacoco/jacoco-report-exclusions.gradle" | |
sonar { | |
properties { | |
property "sonar.projectKey", "App-Android" | |
property "sonar.sourceEncoding", "UTF-8" | |
property "sonar.projectName", "yourAppName" | |
property "sonar.java.coveragePlugin", "jacoco" | |
property "sonar.sources", "${project.projectDir}/src/main/java" | |
property "sonar.tests", "${project.projectDir}/src/test/java" | |
property "sonar.junit.reportPaths", "${project.buildDir}/test-results/testDebugUnitTest" | |
property "sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml" | |
property "sonar.android.lint.reportPaths", "${project.buildDir}/reports/lint-results-debug.xml" | |
property "sonar.projectVersion", "${android.defaultConfig.versionName}.${android.defaultConfig.versionCode}" | |
property "sonar.coverage.exclusions", "${jacocoExclusions}" | |
} | |
} | |
task sonarLocal(type: GradleBuild) { | |
tasks = ['lint', 'jacocoTestReport'] | |
sonarLocal.finalizedBy('sonar') | |
sonar { | |
properties { | |
property "sonar.host.url", "http://localhost:9000" | |
property "sonar.login", "YOUR_KEY_GENERATED" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment