Skip to content

Commit

Permalink
chore: update mockito dependency to version 5.4.0
Browse files Browse the repository at this point in the history
Changed the `build.gradle.kts` (app) mockito version to correspond to the one in `libs.versions.toml`
  • Loading branch information
charliemangano committed Oct 13, 2024
1 parent c3338e0 commit c7cb82a
Showing 1 changed file with 26 additions and 22 deletions.
48 changes: 26 additions & 22 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -102,17 +102,20 @@ sonar {
// Comma-separated paths to the various directories containing the *.xml JUnit report files.
// Each path may be absolute or relative to the project base directory.
property(
"sonar.junit.reportPaths",
"${project.layout.buildDirectory.get()}/test-results/testDebugunitTest/")
"sonar.junit.reportPaths",
"${project.layout.buildDirectory.get()}/test-results/testDebugunitTest/",
)
// Paths to xml files with Android Lint issues. If the main flavor is changed, this file will
// have to be changed too.
property(
"sonar.androidLint.reportPaths",
"${project.layout.buildDirectory.get()}/reports/lint-results-debug.xml")
"sonar.androidLint.reportPaths",
"${project.layout.buildDirectory.get()}/reports/lint-results-debug.xml",
)
// Paths to JaCoCo XML coverage report files.
property(
"sonar.coverage.jacoco.xmlReportPaths",
"${project.layout.buildDirectory.get()}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml")
"sonar.coverage.jacoco.xmlReportPaths",
"${project.layout.buildDirectory.get()}/reports/jacoco/jacocoTestReport/jacocoTestReport.xml",
)
}
}

Expand Down Expand Up @@ -184,7 +187,7 @@ dependencies {
// Material Icons
implementation(libs.androidx.material.icons.extended)
// Mockito for unit testing
testImplementation(libs.mockito.core.v5130)
testImplementation(libs.mockito.core.v540)
}

tasks.withType<Test> {
Expand All @@ -204,26 +207,27 @@ tasks.register("jacocoTestReport", JacocoReport::class) {
}

val fileFilter =
listOf(
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Test*.*",
"android/**/*.*",
)
listOf(
"**/R.class",
"**/R$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"**/*Test*.*",
"android/**/*.*",
)

val debugTree =
fileTree("${project.layout.buildDirectory.get()}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}
fileTree("${project.layout.buildDirectory.get()}/tmp/kotlin-classes/debug") {
exclude(fileFilter)
}

val mainSrc = "${project.layout.projectDirectory}/src/main/java"
sourceDirectories.setFrom(files(mainSrc))
classDirectories.setFrom(files(debugTree))
executionData.setFrom(
fileTree(project.layout.buildDirectory.get()) {
include("outputs/unit_test_code_coverage/debugUnitTest/testDebugUnitTest.exec")
include("outputs/code_coverage/debugAndroidTest/connected/*/coverage.ec")
})
fileTree(project.layout.buildDirectory.get()) {
include("outputs/unit_test_code_coverage/debugUnitTest/testDebugUnitTest.exec")
include("outputs/code_coverage/debugAndroidTest/connected/*/coverage.ec")
}
)
}

0 comments on commit c7cb82a

Please sign in to comment.