First setup of sonar.
This commit is contained in:
@@ -29,6 +29,7 @@ plugins {
|
|||||||
alias(libs.plugins.detekt)
|
alias(libs.plugins.detekt)
|
||||||
alias(libs.plugins.ktlint)
|
alias(libs.plugins.ktlint)
|
||||||
alias(libs.plugins.dependencygraph)
|
alias(libs.plugins.dependencygraph)
|
||||||
|
alias(libs.plugins.sonarqube)
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register<Delete>("clean").configure {
|
tasks.register<Delete>("clean").configure {
|
||||||
@@ -108,3 +109,28 @@ allprojects {
|
|||||||
plugin("org.owasp.dependencycheck")
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -143,3 +143,4 @@ dependencycheck = { id = "org.owasp.dependencycheck", version.ref = "dependencyc
|
|||||||
stem = { id = "com.likethesalad.stem", version.ref = "stem" }
|
stem = { id = "com.likethesalad.stem", version.ref = "stem" }
|
||||||
stemlibrary = { id = "com.likethesalad.stem-library", version.ref = "stem" }
|
stemlibrary = { id = "com.likethesalad.stem-library", version.ref = "stem" }
|
||||||
paparazzi = "app.cash.paparazzi:1.2.0"
|
paparazzi = "app.cash.paparazzi:1.2.0"
|
||||||
|
sonarqube = "org.sonarqube:3.5.0.2730"
|
||||||
|
|||||||
Reference in New Issue
Block a user