diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 0000000..ce9cf95 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,25 @@ +name: SonarCloud Analysis + +on: + push: + branches: [ "main", "develop" ] + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: + pull-requests: read + +jobs: + Analysis: + runs-on: ubuntu-latest + steps: + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@v3.1.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN } + with: + args: + -Dsonar.projectKey=xLexip_Hecate + -Dsonar.organization=xlexip + projectBaseDir: . diff --git a/build.gradle.kts b/build.gradle.kts index 952b930..1a7dbbc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -3,4 +3,13 @@ plugins { alias(libs.plugins.android.application) apply false alias(libs.plugins.kotlin.android) apply false alias(libs.plugins.kotlin.compose) apply false + id("org.sonarqube") version "5.1.0.4882" +} + +sonar { + properties { + property("sonar.projectKey", "xLexip_Hecate") + property("sonar.organization", "xlexip") + property("sonar.host.url", "https://sonarcloud.io") + } } \ No newline at end of file