From d686d7aab24fd9a879b082962d6429c49546f89a Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Wed, 11 Jan 2023 11:22:46 +0100 Subject: [PATCH] Project property value can only be strings. Fix > Failed to notify project evaluation listener. > Could not create task ':element-android:matrix-sdk-android:compileDebugAndroidTestKotlin'. > Could not create task of type 'KotlinCompile'. > class java.util.LinkedHashMap cannot be cast to class java.lang.String (java.util.LinkedHashMap and java.lang.String are in module java.base of loader 'bootstrap') --- coverage.gradle | 4 ++-- matrix-sdk-android/build.gradle | 2 +- vector-app/build.gradle | 2 +- vector/build.gradle | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/coverage.gradle b/coverage.gradle index 2c0af25368..421c500728 100644 --- a/coverage.gradle +++ b/coverage.gradle @@ -80,12 +80,12 @@ task generateCoverageReport(type: JacocoReport) { task unitTestsWithCoverage(type: GradleBuild) { // the 7.1.3 android gradle plugin has a bug where enableTestCoverage generates invalid coverage - startParameter.projectProperties.coverage = [enableTestCoverage: false] + startParameter.projectProperties.coverage = "false" tasks = ['testDebugUnitTest'] } task instrumentationTestsWithCoverage(type: GradleBuild) { - startParameter.projectProperties.coverage = [enableTestCoverage: true] + startParameter.projectProperties.coverage = "true" startParameter.projectProperties['android.testInstrumentationRunnerArguments.notPackage'] = 'im.vector.app.ui' tasks = [':vector-app:connectedGplayDebugAndroidTest', ':vector:connectedDebugAndroidTest', 'matrix-sdk-android:connectedDebugAndroidTest'] } diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index ef6cb8cddb..9c9d2dd0dc 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -81,7 +81,7 @@ android { buildTypes { debug { if (project.hasProperty("coverage")) { - testCoverageEnabled = coverage.enableTestCoverage + testCoverageEnabled = coverage == "true" } // Set to true to log privacy or sensible data, such as token buildConfigField "boolean", "LOG_PRIVATE_DATA", project.property("vector.debugPrivateData") diff --git a/vector-app/build.gradle b/vector-app/build.gradle index a4787e90db..b2cfb7b426 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -232,7 +232,7 @@ android { resValue "color", "launcher_background", "#0DBD8B" if (project.hasProperty("coverage")) { - testCoverageEnabled = coverage.enableTestCoverage + testCoverageEnabled = coverage == "true" } } diff --git a/vector/build.gradle b/vector/build.gradle index e9497c81a0..c5bb55ae9a 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -69,7 +69,7 @@ android { buildTypes { debug { if (project.hasProperty("coverage")) { - testCoverageEnabled = coverage.enableTestCoverage + testCoverageEnabled = coverage == "true" } } }