From 588b87090f9bac6025059b8fd911a96da7f4f527 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sun, 10 Sep 2023 17:50:07 +0200 Subject: [PATCH] bug:testcases not being run due to SDK update (#1604) * bumped roboelectric * fixed outdated jacoco also not liking the new sdk version * fixed tasks.register being used instead of the ordinary task definiiton --- app/build.gradle | 2 +- gradle/scripts/checkstyle.gradle | 2 +- gradle/scripts/jacoco.gradle | 5 +++-- gradle/scripts/pmd.gradle | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 67fe47be8a..f1dfe6292a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -194,7 +194,7 @@ dependencies { testImplementation 'com.android.support.test:rules:1.0.2' testImplementation 'com.android.support.test:runner:1.0.2' testImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - testImplementation 'org.robolectric:robolectric:4.8.1' + testImplementation 'org.robolectric:robolectric:4.10.3' // TicketSale diff --git a/gradle/scripts/checkstyle.gradle b/gradle/scripts/checkstyle.gradle index 44c689b9d4..0149666490 100644 --- a/gradle/scripts/checkstyle.gradle +++ b/gradle/scripts/checkstyle.gradle @@ -1,6 +1,6 @@ apply plugin: 'checkstyle' -task checkstyle(type: Checkstyle) { +tasks.register('checkstyle', Checkstyle) { showViolations = true configFile file("$rootDir/gradle/config/checkstyle.xml") source 'src/main/java' diff --git a/gradle/scripts/jacoco.gradle b/gradle/scripts/jacoco.gradle index 26d74418a5..8fddedfe4d 100644 --- a/gradle/scripts/jacoco.gradle +++ b/gradle/scripts/jacoco.gradle @@ -1,10 +1,11 @@ apply plugin: 'jacoco' jacoco { - toolVersion = "0.8.5" + toolVersion = "0.8.10" } -task jacocoTestReport(type: JacocoReport, dependsOn: "testDebugUnitTest") { +tasks.register('jacocoTestReport', JacocoReport) { + dependsOn "testDebugUnitTest" group = "Reporting" description = "Generate Jacoco coverage reports for Debug build" diff --git a/gradle/scripts/pmd.gradle b/gradle/scripts/pmd.gradle index c4de0f4fcb..f21bcbfe24 100644 --- a/gradle/scripts/pmd.gradle +++ b/gradle/scripts/pmd.gradle @@ -1,6 +1,6 @@ apply plugin: 'pmd' -task pmd(type: Pmd) { +tasks.register('pmd', Pmd) { description 'Run PMD' ruleSetFiles = files("$rootDir/gradle/config/pmd-ruleset.xml")