-
Notifications
You must be signed in to change notification settings - Fork 48
/
sonarqube.gradle
30 lines (28 loc) · 1.36 KB
/
sonarqube.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
apply plugin: "org.sonarqube"
sonarqube {
properties {
property "sonar.projectName", "Oppia Core app"
property "sonar.projectKey", "DigitalCampus_oppia-mobile-android"
property "sonar.organization", "oppiamobile"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.projectVersion", android.defaultConfig.versionName
property "sonar.tests", "src/test/java, src/androidTest/java"
property "sonar.test.inclusions", "**/*Test*/**"
property "sonar.sourceEncoding", "UTF-8"
property "sonar.sources", "src/main/java"
property "sonar.exclusions", '**/*Test*/**,' +
'build/**' +
'*.json,' +
'**/*test*/**,' +
'**/.gradle/**,' +
'**/R.class'
property "sonar.java.coveragePlugin", "jacoco"
property "sonar.junit.reportPaths", "**/test-results/**/*.xml"
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/coverage/androidTest/normal/debug/connected/report.xml"
def sonarqubePropsFile = rootProject.file('sonarqube.properties')
if (sonarqubePropsFile.canRead()) {
def sonarqubeProps = new Properties()
sonarqubeProps.load(new FileInputStream(sonarqubePropsFile))
property "sonar.login", sonarqubeProps["sonar.login"]
}
}}