From 789cc6b597b61acf420f8943d84b318cef27c941 Mon Sep 17 00:00:00 2001 From: Adam Brown Date: Mon, 27 Sep 2021 17:16:36 +0100 Subject: [PATCH] exlcuding the slf4j logger from the test dependencies the videocache dependency includes slf4j which in turn causes mockk to reflectively attempt to call real Log functions, which crashes the units tests due to the stub android.jar --- vector/build.gradle | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vector/build.gradle b/vector/build.gradle index d60f928f2c..1b28422eca 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -314,6 +314,11 @@ android { } } +configurations { + // videocache includes a sl4j logger which causes mockk to attempt to call the static android Log + testImplementation.exclude group: 'org.slf4j', module: 'slf4j-android' +} + dependencies { implementation project(":matrix-sdk-android") @@ -490,6 +495,7 @@ dependencies { // TESTS testImplementation libs.tests.junit testImplementation libs.tests.kluent + testImplementation libs.mockk.mockk // Plant Timber tree for test testImplementation libs.tests.timberJunitRule