Trying to set code coverage.
This commit is contained in:
parent
49f5848e7b
commit
4fce19bad4
@ -11,7 +11,7 @@ steps:
|
|||||||
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
- mkdir -p ~/.gradle && echo "org.gradle.daemon=false\nignoreGitVersion=true\npushCache=false\nsystemProp.org.gradle.internal.http.connectionTimeout=180000\nsystemProp.org.gradle.internal.http.socketTimeout=180000" >> ~/.gradle/gradle.properties
|
||||||
- echo "---------------------------------------------------------"
|
- echo "---------------------------------------------------------"
|
||||||
- echo "Analysing..."
|
- echo "Analysing..."
|
||||||
- ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN
|
- ./gradlew koverMergedXmlReport && ./gradlew sonarqube -Dsonar.projectKey=RFS2 -Dsonar.host.url=$SONAR_HOST_URL -Dsonar.login=$SONAR_LOGIN
|
||||||
- echo "---------------------------------------------------------"
|
- echo "---------------------------------------------------------"
|
||||||
- echo "Building..."
|
- echo "Building..."
|
||||||
- ./gradlew build -x test
|
- ./gradlew build -x test
|
||||||
|
@ -8,6 +8,7 @@ plugins {
|
|||||||
kotlin("android")
|
kotlin("android")
|
||||||
kotlin("kapt")
|
kotlin("kapt")
|
||||||
id("com.mikepenz.aboutlibraries.plugin")
|
id("com.mikepenz.aboutlibraries.plugin")
|
||||||
|
id("org.jetbrains.kotlinx.kover") version "0.6.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
fun Project.execWithOutput(cmd: String, ignore: Boolean = false): String {
|
fun Project.execWithOutput(cmd: String, ignore: Boolean = false): String {
|
||||||
|
@ -11,8 +11,9 @@ plugins {
|
|||||||
id("com.android.library").version("7.3.1").apply(false)
|
id("com.android.library").version("7.3.1").apply(false)
|
||||||
kotlin("android").version("1.7.20").apply(false)
|
kotlin("android").version("1.7.20").apply(false)
|
||||||
kotlin("multiplatform").version("1.7.20").apply(false)
|
kotlin("multiplatform").version("1.7.20").apply(false)
|
||||||
id("org.sonarqube").version("3.4.0.2513").apply(false)
|
id("org.sonarqube").version("3.4.0.2513")
|
||||||
id("com.mikepenz.aboutlibraries.plugin").version("10.5.1").apply(false)
|
id("com.mikepenz.aboutlibraries.plugin").version("10.5.1").apply(false)
|
||||||
|
id("org.jetbrains.kotlinx.kover") version "0.6.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
apply(plugin = "org.sonarqube")
|
apply(plugin = "org.sonarqube")
|
||||||
@ -30,3 +31,17 @@ allprojects {
|
|||||||
tasks.register("clean", Delete::class) {
|
tasks.register("clean", Delete::class) {
|
||||||
delete(rootProject.buildDir)
|
delete(rootProject.buildDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
sonarqube {
|
||||||
|
properties {
|
||||||
|
property("sonar.coverage.jacoco.xmlReportPaths", "${rootProject.buildDir}/reports/kover/merged/xml/report.xml")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
project.tasks["sonarqube"].dependsOn "koverMergedXmlReport"
|
||||||
|
|
||||||
|
koverMerged {
|
||||||
|
enable()
|
||||||
|
}
|
@ -10,6 +10,7 @@ plugins {
|
|||||||
id("com.android.library")
|
id("com.android.library")
|
||||||
id("com.squareup.sqldelight")
|
id("com.squareup.sqldelight")
|
||||||
kotlin("plugin.serialization") version "1.4.10"
|
kotlin("plugin.serialization") version "1.4.10"
|
||||||
|
id("org.jetbrains.kotlinx.kover") version "0.6.1"
|
||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
|
Loading…
Reference in New Issue
Block a user