element-x-ada/tests/uitests/build.gradle.kts
Jorge Martin Espinosa 8865cc2b57
Disable Paparazzi tasks when Kover is running. (#884)
* Disable Paparazzi tasks when Kover is running.

It allows us to split the test jobs between unit tests, screenshot test and coverage reports.

* Move Sonar upload to the quality workflow, since we have no lint info in tests.
2023-07-17 10:55:51 +02:00

54 lines
1.7 KiB
Kotlin

/*
* Copyright (c) 2022 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import extension.allFeaturesImpl
import extension.allLibrariesImpl
import extension.allServicesImpl
plugins {
id("io.element.android-compose-library")
alias(libs.plugins.ksp)
alias(libs.plugins.paparazzi)
}
android {
namespace = "io.element.android.tests.uitests"
}
// Workaround: `kover` tasks somehow trigger the screenshot tests with a broken configuration, removing
// any previous test results and not creating new ones. This is a workaround to disable the screenshot tests
// when the `kover` tasks are detected.
tasks.withType<Test>() {
if (project.gradle.startParameter.taskNames.any { it.contains("kover", ignoreCase = true) }) {
println("WARNING: Kover task detected, disabling screenshot test task $name.")
isEnabled = false
}
}
dependencies {
testImplementation(libs.test.junit)
testImplementation(libs.test.parameter.injector)
testImplementation(projects.libraries.designsystem)
androidTestImplementation(libs.test.junitext)
ksp(libs.showkase.processor)
kspTest(libs.showkase.processor)
implementation(libs.showkase)
allLibrariesImpl()
allServicesImpl()
allFeaturesImpl(rootDir, logger)
}