From ca8433f084160764e1ab26b7b985f354529463cd Mon Sep 17 00:00:00 2001 From: Christopher Ferreira Date: Mon, 1 Jul 2024 12:34:56 +0100 Subject: [PATCH] chore: wip sonar --- .github/workflows/main.yml | 19 ++++++++++++++++--- metamask-android-sdk/build.gradle | 3 ++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db828514..0783a314 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,20 @@ on: jobs: sonarcloud-scan: + runs-on: ubuntu-latest name: Run SonarCloud Scan - uses: MetaMask/metamask-sdk/.github/workflows/sonar-cloud.yml@535a911b02d28a61ab305841f8b14b83e91c7000 - secrets: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} \ No newline at end of file + steps: + - name: Checkout project sources + uses: actions/checkout@v4 + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + with: + build-scan-publish: true + build-scan-terms-of-use-url: "https://gradle.com/terms-of-service" + build-scan-terms-of-use-agree: "yes" + + - name: Run sonar + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: ./gradlew sonar -Dsonar.token=$SONAR_TOKEN \ No newline at end of file diff --git a/metamask-android-sdk/build.gradle b/metamask-android-sdk/build.gradle index 70cf4cb9..d4a247c9 100644 --- a/metamask-android-sdk/build.gradle +++ b/metamask-android-sdk/build.gradle @@ -65,7 +65,8 @@ sonar { properties { property "sonar.projectKey", "metamask-android-sdk" property "sonar.organization", "metamask" - property "sonar.host.url", "https://sonarcloud.io" + property "sonar.sources", "metamask-android-sdk/src/main/java" + property "sonar.exclusions", "**/generated/**" } }