Big changes
This commit is contained in:
+31
-1
@@ -17,7 +17,7 @@ val membyGatewayUrl: String = (project.findProperty("memby.gatewayUrl") as Strin
|
||||
|
||||
// A release workflow can derive the app version from its Git tag without editing the
|
||||
// source tree. Local builds keep using the checked-in default.
|
||||
val defaultVersionName = "0.1.54"
|
||||
val defaultVersionName = "0.1.69"
|
||||
val membyVersionName: String =
|
||||
(project.findProperty("memby.versionName") as String?)
|
||||
?.trim()
|
||||
@@ -116,6 +116,21 @@ android {
|
||||
abortOnError = false
|
||||
}
|
||||
|
||||
testOptions {
|
||||
unitTests {
|
||||
// Robolectric needs the merged resources to inflate anything; only the
|
||||
// screenshot tests use them.
|
||||
isIncludeAndroidResources = true
|
||||
|
||||
// Roborazzi writes PNGs only in record mode. These images are artifacts to
|
||||
// look at, not checked-in goldens to diff against, so recording is always on
|
||||
// — a screenshot test that silently captures nothing is worse than none.
|
||||
all {
|
||||
it.systemProperty("roborazzi.test.record", "true")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
@@ -133,6 +148,10 @@ dependencies {
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.8.7")
|
||||
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.8.7")
|
||||
implementation("androidx.work:work-runtime-ktx:2.10.0")
|
||||
// ProcessLifecycleOwner: lets the status poll stop while no Memby screen is on top,
|
||||
// instead of hitting the gateway every ten seconds for as long as the process lives.
|
||||
implementation("androidx.lifecycle:lifecycle-process:2.8.7")
|
||||
implementation("androidx.savedstate:savedstate-ktx:1.2.1")
|
||||
// Measurement only: JankStats is enabled by PerformanceMonitor for debug builds.
|
||||
implementation("androidx.metrics:metrics-performance:1.0.0")
|
||||
@@ -167,4 +186,15 @@ dependencies {
|
||||
debugImplementation("androidx.compose.ui:ui-tooling")
|
||||
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
|
||||
// Screenshot rendering only. Everything else under app/src/test stays plain JUnit
|
||||
// with no Android on the classpath — see the note in CLAUDE.md. Rendering a
|
||||
// composable is the one thing that genuinely cannot be done that way, and these are
|
||||
// confined to *ScreenshotTest.kt files.
|
||||
testImplementation("org.robolectric:robolectric:4.14.1")
|
||||
testImplementation("androidx.test.ext:junit:1.2.1")
|
||||
testImplementation("io.github.takahirom.roborazzi:roborazzi:1.32.2")
|
||||
testImplementation("io.github.takahirom.roborazzi:roborazzi-compose:1.32.2")
|
||||
testImplementation("androidx.compose.ui:ui-test-junit4")
|
||||
debugImplementation("androidx.compose.ui:ui-test-manifest")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user