mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-03 16:10:00 +00:00
Sonar: analyse what's in kotlin folders.
This commit is contained in:
@@ -113,6 +113,7 @@ allprojects {
|
|||||||
// To run a sonar analysis:
|
// To run a sonar analysis:
|
||||||
// Run './gradlew sonar -Dsonar.login=<SONAR_LOGIN>'
|
// Run './gradlew sonar -Dsonar.login=<SONAR_LOGIN>'
|
||||||
// The SONAR_LOGIN is stored in passbolt as Token Sonar Cloud Bma
|
// The SONAR_LOGIN is stored in passbolt as Token Sonar Cloud Bma
|
||||||
|
// Sonar result can be found here: https://sonarcloud.io/project/overview?id=vector-im_element-x-android
|
||||||
sonar {
|
sonar {
|
||||||
properties {
|
properties {
|
||||||
property("sonar.projectName", "element-x-android")
|
property("sonar.projectName", "element-x-android")
|
||||||
@@ -134,3 +135,19 @@ sonar {
|
|||||||
property("sonar.exclusions", "**/BugReporterMultipartBody.java")
|
property("sonar.exclusions", "**/BugReporterMultipartBody.java")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
allprojects {
|
||||||
|
val projectDir = projectDir.toString()
|
||||||
|
sonar {
|
||||||
|
properties {
|
||||||
|
// Note: folders `kotlin` are not supported (yet), I asked on their side: https://community.sonarsource.com/t/82824
|
||||||
|
// As a workaround provide the path in `sonar.sources` property.
|
||||||
|
if (File("$projectDir/src/main/kotlin").exists()) {
|
||||||
|
property("sonar.sources", "src/main/kotlin")
|
||||||
|
}
|
||||||
|
if (File("$projectDir/src/test/kotlin").exists()) {
|
||||||
|
property("sonar.tests", "src/test/kotlin")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user