From 096344241d68f73ac40e2b503a7a5a65a89d16cd Mon Sep 17 00:00:00 2001 From: aminecmi Date: Sat, 23 Jul 2022 22:28:06 +0200 Subject: [PATCH] Drone. --- .drone.yaml | 22 ++++++++++++++++++++++ build.gradle.kts | 7 ++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .drone.yaml 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()