adding fragment testing dependency as a possible solution for missing jacoco agent on CI

This commit is contained in:
Adam Brown 2022-08-11 09:50:10 +01:00
parent 18a9846071
commit 244aa094ef
4 changed files with 9 additions and 5 deletions

View File

@ -49,6 +49,7 @@ jobs:
disable-animations: true disable-animations: true
emulator-build: 7425822 emulator-build: 7425822
script: | script: |
./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES ./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES ./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES ./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES
@ -65,6 +66,7 @@ jobs:
disable-animations: true disable-animations: true
emulator-build: 7425822 emulator-build: 7425822
script: | script: |
./gradlew gatherGplayDebugStringTemplates $CI_GRADLE_ARG_PROPERTIES
./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES ./gradlew unitTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES ./gradlew instrumentationTestsWithCoverage $CI_GRADLE_ARG_PROPERTIES
./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES ./gradlew generateCoverageReport $CI_GRADLE_ARG_PROPERTIES

View File

@ -32,6 +32,7 @@ buildscript {
classpath 'org.owasp:dependency-check-gradle:7.1.2' classpath 'org.owasp:dependency-check-gradle:7.1.2'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10" classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10"
classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0" classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0"
classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3'
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }

View File

@ -74,7 +74,7 @@ def collectProjects(predicate) {
task generateCoverageReport(type: JacocoReport) { task generateCoverageReport(type: JacocoReport) {
outputs.upToDateWhen { false } outputs.upToDateWhen { false }
rootProject.apply plugin: 'jacoco' rootProject.apply plugin: 'jacoco'
def projects = collectProjects { ['vector', 'matrix-sdk-android'].contains(it.name) } def projects = collectProjects { ['vector-app', 'vector', 'matrix-sdk-android'].contains(it.name) }
initializeReport(it, projects, excludes) initializeReport(it, projects, excludes)
} }

View File

@ -375,4 +375,5 @@ dependencies {
androidTestUtil libs.androidx.orchestrator androidTestUtil libs.androidx.orchestrator
androidTestImplementation libs.androidx.fragmentTesting androidTestImplementation libs.androidx.fragmentTesting
androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10"
debugImplementation libs.androidx.fragmentTesting
} }