gradle/test.gradle
ext {
junitVersion = '5.8.1'
}
dependencies {
testImplementation gradleTestKit()
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-params:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
maxParallelForks = Runtime.runtime.availableProcessors()
}
jacocoAndroidUnitTestReport {
html.enabled true
xml.enabled true
}
tasks.named('check').configure {
dependsOn jacocoTestReport
}
sonarqube {
properties {
property "sonar.projectKey", "abd3lraouf_Semantic"
property "sonar.organization", "abd3lraouf"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.coverage.jacoco.xmlReportPaths", "$buildDir/jacoco/jacoco.xml"
}
}
tasks.named('sonarqube').configure {
mustRunAfter jacocoTestReport
}