diff --git a/.drone.yaml b/.drone.yaml new file mode 100644 index 0000000..fbc2ea9 --- /dev/null +++ b/.drone.yaml @@ -0,0 +1,22 @@ +kind: pipeline +type: docker + +steps: + - name: code-analysis + image: sonarsource/sonar-scanner-cli + detach: true + failure: ignore + commands: + - ls -la + - ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.sources=. -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN + environment: + SONAR_HOST_URL: + from_secret: sonarScannerHostUrl + SONAR_LOGIN: + from_secret: sonarScannerLogin + + + - name: build + image: mingc/android-build-box:latest + commands: + - ./gradlew build diff --git a/build.gradle.kts b/build.gradle.kts index 012c4be..209e858 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,10 +6,15 @@ buildscript { } dependencies { classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10") - classpath("com.android.tools.build:gradle:7.2.0") + classpath("com.android.tools.build:gradle:7.2.1") + + // sonarquve + classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513") } } +apply(plugin = "org.sonarqube") + allprojects { repositories { google()