Browse Source

First setup of sonar.

feature/jme/update_rust_sdk
Benoit Marty 2 years ago
parent
commit
c338e1d34e
  1. 26
      build.gradle.kts
  2. 1
      gradle/libs.versions.toml

26
build.gradle.kts

@ -29,6 +29,7 @@ plugins { @@ -29,6 +29,7 @@ plugins {
alias(libs.plugins.detekt)
alias(libs.plugins.ktlint)
alias(libs.plugins.dependencygraph)
alias(libs.plugins.sonarqube)
}
tasks.register<Delete>("clean").configure {
@ -108,3 +109,28 @@ allprojects { @@ -108,3 +109,28 @@ allprojects {
plugin("org.owasp.dependencycheck")
}
}
// To run a sonar analysis:
// Run './gradlew sonar -Dsonar.login=<SONAR_LOGIN>'
// The SONAR_LOGIN is stored in passbolt as Token Sonar Cloud Bma
sonar {
properties {
property("sonar.projectName", "element-x-android")
property("sonar.projectKey", "vector-im_element-x-android")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.projectVersion", "1.0") // TODO project(":app").android.defaultConfig.versionName)
property("sonar.sourceEncoding", "UTF-8")
property("sonar.links.homepage", "https://github.com/vector-im/element-x-android/")
property("sonar.links.ci", "https://github.com/vector-im/element-x-android/actions")
property("sonar.links.scm", "https://github.com/vector-im/element-x-android/")
property("sonar.links.issue", "https://github.com/vector-im/element-x-android/issues")
property("sonar.organization", "new_vector_ltd_organization")
// property("sonar.java.coveragePlugin", "jacoco")
// property("sonar.coverage.jacoco.xmlReportPaths", "${project.buildDir}/reports/jacoco/generateCoverageReport/generateCoverageReport.xml")
property("sonar.login", if (project.hasProperty("SONAR_LOGIN")) project.property("SONAR_LOGIN")!! else "invalid")
// exclude source code from analyses separated by a colon (:)
// Exclude Java source
property("sonar.exclusions", "**/BugReporterMultipartBody.java")
}
}

1
gradle/libs.versions.toml

@ -143,3 +143,4 @@ dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "dependencyc @@ -143,3 +143,4 @@ dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "dependencyc
stem = { id = "com.likethesalad.stem", version.ref = "stem" }
stemlibrary = { id = "com.likethesalad.stem-library", version.ref = "stem" }
paparazzi = "app.cash.paparazzi:1.2.0"
sonarqube = "org.sonarqube:3.5.0.2730"

Loading…
Cancel
Save