mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 15:17:05 +05:30
feat(common): set up for Compose screenshot testing
This commit is contained in:
parent
7037d55bf2
commit
ed4c573ee4
3 changed files with 9 additions and 1 deletions
|
@ -14,6 +14,7 @@ plugins {
|
|||
alias(libs.plugins.anvil)
|
||||
alias(libs.plugins.whetstone)
|
||||
alias(libs.plugins.kotlin.composeCompiler)
|
||||
alias(libs.plugins.screenshot)
|
||||
}
|
||||
|
||||
android {
|
||||
|
@ -23,6 +24,7 @@ android {
|
|||
}
|
||||
composeOptions { useLiveLiterals = false }
|
||||
namespace = "dev.msfjarvis.claw.common"
|
||||
experimentalProperties["android.experimental.enableScreenshotTest"] = true
|
||||
}
|
||||
|
||||
androidComponents { beforeVariants { (it as HasUnitTestBuilder).enableUnitTest = false } }
|
||||
|
@ -57,6 +59,8 @@ dependencies {
|
|||
implementation(libs.kotlinResult.coroutines)
|
||||
implementation(libs.napier)
|
||||
|
||||
screenshotTestImplementation(libs.androidx.compose.ui.tooling)
|
||||
|
||||
compileOnly(libs.androidx.compose.ui.tooling.preview)
|
||||
|
||||
runtimeOnly(libs.androidx.compose.ui.tooling)
|
||||
|
|
|
@ -49,9 +49,12 @@ android.dependencyResolutionAtConfigurationTime.disallow=true
|
|||
android.disableEarlyManifestParsing=true
|
||||
|
||||
# Disable warnings about unsupported features
|
||||
android.suppressUnsupportedOptionWarnings=android.dependencyResolutionAtConfigurationTime.disallow,android.disableEarlyManifestParsing,android.suppressUnsupportedOptionWarnings
|
||||
android.suppressUnsupportedOptionWarnings=android.dependencyResolutionAtConfigurationTime.disallow,android.disableEarlyManifestParsing,android.experimental.enableScreenshotTest,android.suppressUnsupportedOptionWarnings
|
||||
android.suppressUnsupportedCompileSdk=35
|
||||
|
||||
# Enable screenshot tests
|
||||
android.experimental.enableScreenshotTest=true
|
||||
|
||||
# Make Spotless default to keeping license headers years in sync
|
||||
spotlessSetLicenseHeaderYearsFromGitHistory=true
|
||||
|
||||
|
|
|
@ -129,6 +129,7 @@ licensee = "app.cash.licensee:1.11.0"
|
|||
modulegraphassert = "com.jraska.module.graph.assertion:2.7.1"
|
||||
navigation-safeargs = { id = "androidx.navigation.safeargs.kotlin", version.ref = "navigation" }
|
||||
poko = "dev.drewhamilton.poko:0.17.0"
|
||||
screenshot = "com.android.compose.screenshot:0.0.1-alpha05"
|
||||
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
|
||||
tracelog = "dev.msfjarvis.tracelog:0.1.3"
|
||||
whetstone = { id = "dev.msfjarvis.whetstone", version.ref = "whetstone" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue