From f96788ccd92941da3716ac9ff1fe4ab9cde646ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Mart=C3=ADn?= Date: Thu, 15 Feb 2024 11:11:58 +0100 Subject: [PATCH] Try fixing nightly reports --- build.gradle.kts | 24 ++++++++++++++++++++++++ gradle/libs.versions.toml | 4 ++++ 2 files changed, 28 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index b2eccfd..86f6a11 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,4 +8,28 @@ buildscript { plugins { alias(libs.plugins.android.library) apply false alias(libs.plugins.kotlin.android) apply false + alias(libs.plugins.sonarqube) + alias(libs.plugins.dependencycheck) +} + +// To run a sonar analysis: +// Run './gradlew sonar -Dsonar.login=' +// The SONAR_LOGIN is stored in passbolt as Token Sonar Cloud Bma +// Sonar result can be found here: https://sonarcloud.io/project/overview?id=element-hq_compound-android +sonar { + properties { + property("sonar.projectName", "compound-android") + property("sonar.projectKey", "element-hq_compound-android") + property("sonar.host.url", "https://sonarcloud.io") + property("sonar.projectVersion", "1.0") + property("sonar.sourceEncoding", "UTF-8") + property("sonar.links.homepage", "https://github.com/element-hq/compound-android/") + property("sonar.links.ci", "https://github.com/element-hq/compound-android/actions") + property("sonar.links.scm", "https://github.com/element-hq/compound-android/") + property("sonar.links.issue", "https://github.com/element-hq/compound-android/issues") + property("sonar.organization", "new_vector_ltd_organization") + property("sonar.login", if (project.hasProperty("SONAR_LOGIN")) project.property("SONAR_LOGIN")!! else "invalid") + + // exclude source code from analyses separated by a colon (:) + } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6e258fe..9e14e81 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -19,11 +19,13 @@ showkase = "1.0.2" ui-tooling-preview-android = "1.6.1" kover = "0.7.5" roborazzi = "1.9.0" +dependencyAnalysis = "1.30.0" [libraries] # Project kotlin_gradle_plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } kover_gradle_plugin = { module = "org.jetbrains.kotlinx:kover-gradle-plugin", version.ref = "kover" } +autonomousapps_dependencyanalysis_plugin = { module = "com.autonomousapps:dependency-analysis-gradle-plugin", version.ref = "dependencyAnalysis" } # AndroidX androidx_compose_bom = { module = "androidx.compose:compose-bom", version.ref = "compose_bom" } @@ -59,3 +61,5 @@ ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" } maven_publish = { id = "com.vanniktech.maven.publish", version = "0.27.0" } kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" } roborazzi = { id = "io.github.takahirom.roborazzi", version.ref = "roborazzi" } +dependencycheck = "org.owasp.dependencycheck:9.0.9" +sonarqube = "org.sonarqube:4.4.1.3373" \ No newline at end of file