paparazzi-tests: init

This commit is contained in:
Harsh Shandilya 2022-06-25 18:37:04 +05:30
parent 356da53afb
commit 088d8606a6
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
4 changed files with 36 additions and 0 deletions

View file

@ -73,3 +73,4 @@ compose = "org.jetbrains.compose:1.1.1"
hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" } hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" } sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
aurora-svg-transcoder = { id = "org.pushing-pixels.aurora.tools.svgtranscoder.gradle", version.ref = "aurora" } aurora-svg-transcoder = { id = "org.pushing-pixels.aurora.tools.svgtranscoder.gradle", version.ref = "aurora" }
paparazzi = { id = "app.cash.paparazzi", version = "1.0.0" }

View file

@ -0,0 +1,7 @@
# paparazzi-tests
[Paparazzi](https://github.com/cashapp/paparazzi) is a Gradle plugin and library that allows writing
Android UI tests that run on the JVM. However, it does not support Kotlin Multiplatform so we're
using this Android library module to hide the Multiplatform aspect of the project from Paparazzi. In
the future this will be natively supported and we can disperse the tests contained in this module
into existing ones.

View file

@ -0,0 +1,26 @@
@file:Suppress("DSL_SCOPE_VIOLATION")
plugins {
id("dev.msfjarvis.claw.android-library")
id("dev.msfjarvis.claw.kotlin-android")
alias(libs.plugins.paparazzi)
}
androidComponents { beforeVariants(selector().all()) { it.enable = it.buildType == "debug" } }
android {
namespace = "dev.msfjarvis.claw.android.tests"
buildFeatures { compose = true }
}
dependencies {
testImplementation(kotlin("test-junit"))
testImplementation(projects.android)
testImplementation(projects.common)
testImplementation(projects.model)
testImplementation(projects.database)
}
tasks.withType<Test>().configureEach {
javaLauncher.set(javaToolchains.launcherFor { languageVersion.set(JavaLanguageVersion.of(11)) })
}

View file

@ -84,3 +84,5 @@ include(":database")
include(":desktop") include(":desktop")
include(":model") include(":model")
include(":paparazzi-tests")