Skip to content

Commit 9ce1fd4

Browse files
committed
feat: added sonar
M .github/workflows/security-scan.yaml M android/app/build.gradle.kts
1 parent 993ca0e commit 9ce1fd4

File tree

2 files changed

+31
-4
lines changed

2 files changed

+31
-4
lines changed

.github/workflows/security-scan.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,10 @@ jobs:
7878
- name: Make gradlew executable
7979
run: chmod +x ./gradlew
8080

81-
- name: Build and analyze
81+
- name: Build
82+
run: |
83+
./gradlew build sonar --info
84+
- name: SonarQube Scan
85+
uses: SonarSource/sonarqube-scan-action@v5
8286
env:
83-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8487
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
85-
run: |
86-
./gradlew build sonar --info -Dsonar.scanner.skipJreProvisioning=true

android/app/build.gradle.kts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
11
plugins {
22
id("com.android.application")
33
id("kotlin-android")
4+
id("org.sonarqube") version "6.3.1.5724"
45
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
56
id("dev.flutter.flutter-gradle-plugin")
67
}
78

9+
sonar {
10+
properties {
11+
property(
12+
"sonar.projectKey",
13+
"ZProfile_flutter-client",
14+
)
15+
property(
16+
"sonar.organization",
17+
"zprofile01",
18+
)
19+
property(
20+
"sonar.verbose",
21+
true,
22+
)
23+
property(
24+
"sonar.flutter.source.version",
25+
"3.8.1",
26+
)
27+
property(
28+
"sonar.language",
29+
"flutter",
30+
)
31+
}
32+
}
33+
834
android {
935
namespace = "com.example.zprofile"
1036
compileSdk = flutter.compileSdkVersion

0 commit comments

Comments
 (0)