Repository navigation
Releases
2.0.0-alpha05.1
This release swaps layoutlib's simplified window and render model for the framework's, so behavior follows the platform as it changes. Dialogs, popups and sheets are real windows with their own ViewRootImpl, giving z-order, dimming and per-window insets that match the device. Measure, layout and pre-draw run through ViewRootImpl.doTraversal(), and each render session owns its Looper.
Accessibility goldens, and goldens using the V_SCROLL, H_SCROLL and FULL_EXPAND rendering modes, change with this version and will need re-recording.
New
paparazzi.gif {
CircularProgressIndicator()
}- Add
app.cash.paparazzi.reportType=nativeto publish snapshot diffs as attachments on Gradle's test report instead of replacing Gradle's reporter. Requires Gradle 9.4+.legacystays the default for now, but will be removed in an upcoming release (#2436) - Add
app.cash.paparazzi.nativeReportFrameworksto choose which frameworks native mode supports:junit4(the default),junit5, or both, so a JUnit 4 project never pulls in the Jupiter engine (#2450) - [Gradle Plugin] Android Gradle Plugin 9.0.0 (#2198)
Fixed
AnimatedVectorDrawablenow advances with the snapshot offset instead of rendering at time zero (#2472)- Fix infinite loop when verifying single-frame goldens (#2379)
- Exclude blank text from merged accessibility labels (#2331, #2372)
- Prune hidden accessibility subtrees (#2383)
- Filter hidden Compose accessibility semantics (#2430)
- [Gradle Plugin] Fix
cleanRecordrace condition between snapshot recording and deletion under parallel builds (#2377) - [Gradle Plugin] Fix remote build cache misses caused by absolute paths in the test task's system properties (#1874, #2381, #2452)
- [Gradle Plugin]
cleanRecordPaparazzideletes the variant's own snapshots rather than every variant's (#2456)
Kudos to @geoff-powell, @colinmarsch, @arpitagarwal1301, @FilippoVigani, @abeggsnf, @oldergod and others for contributions this release!
2.0.0-alpha05
This release supports pre-AGP 9.0 consumers.
New
- Add support for the new Android library multiplatform plugin (#2115, #2332)
- Add
setup/teardownhooks on Paparazzi to decouple from JUnit 4; document usage with JUnit Jupiter (#2209, #2333) - LayoutLib v16.2.1
- Compose 1.11.2
- [Gradle Plugin] Gradle 9.3.1
- [Gradle Plugin] Tidy task wiring and inputs (#2205, #2334). Note that the /failures directory is now variant-aware
Fixed
- Fix configuration-cache issue resolving
projectin provider mapping (#2241) - Fix
NoClassDefFoundErroronorg/gradle/reporting/HtmlWriterToolsto support Gradle 8.x users (#2316) - Destroy lifecycle owner after snapshots (#2325)
- Fix Paparazzi dependency scope for KMP Android tests (#2330)
Kudos to @geoff-powell, @nishatoma, @colinmarsch, @oldergod, @eboudrant, @tcmulcahy and others for contributions this release!
2.0.0-alpha04
As of this release, consumers must build on Java 21+ environments.
New
- Allow differ to be configured (#2001)
- Introduce additional differ types (#2009)
- Introduce defaultLocale system property (#2203)
- Update DeviceConfigs (#2176)
- Support custom view accessibility hierarchy ordering in accessibility snapshots (#2150)
- Add support for overwriting snapshots when max percent diff threshold is reached (#2067)
- LayoutLib v16.1.1 (#2185)
- Compose 1.10.1
- Kotlin 2.3.0
- [Gradle Plugin] Gradle 9.2.1
- [Gradle Plugin] Android Gradle Plugin 8.13.2
Fixed
- Handle SemanticsNode traversalIndices to support Compose accessibility reordering (#2019)
- Add fix for boundsInWindow incorrectly calculating position on screen (#1983)
- Fix compose accessibility ordering (#2037)
- Fix in-list reporting for nested nodes for accessibility (#2053)
- Fix reporting in list when item doesn't have any accessibility identifiers (#2051)
- Fix progress bar accessibility ordering (#2208)
- Fix font loading on Windows (#2074)
- Fail test if exception is thrown during effect (#2214)
- Fix differ comparison between black pixels with 100% alpha and black pixels with 0% alpha (#2078)
- Adjust apng failure precision (#2186)
- Make plugin compatible with Gradle Isolated Projects (#2154)
Changed
Kudos to @geoff-powell, @colinmarsch, @SimonMarquis, @nishatoma, @joshskeen, @kboyarshinov and others for contributions this release!
2.0.0-alpha03
Ignore; use 2.0.0-alpha04 instead.
2.0.0-alpha02
New
- Bump default compileSdk to API 36
- LayoutLib v15.2.3
- Compose 1.8.3
- Kotlin 2.1.21
- [Gradle Plugin] Gradle 8.14.2
- [Gradle Plugin] Android Gradle Plugin 8.10.1
Fixed
- Generate build failures even if golden images are not present
- Fully advance choreographer correctly for Compose
- [Accessibility] Denote elements in lists in the legend
Changed
- In-development snapshots are now published to the Central Portal Snapshots repository at https://central.sonatype.com/repository/maven-snapshots/.
Kudos to @geoff-powell, @colinmarsch, @SimonMarquis and others for contributions this release!
2.0.0-alpha01
New
- Support for editable text in accessibility snapshots
- Support for error description in accessibility snapshots
- Support progress compose semantics in accessibility snapshots
- Support custom actions and link annotations in Compose accessibility snapshots
- Support additional accessibility properties on views
- Support live regions in accessibility snapshots
- Add support for compose views that are hidden or invisible
- Add gradle property to control default max percent difference
- LayoutLib v15.1.4
- [Gradle Plugin] Gradle 8.13
- [Gradle Plugin] Android Gradle Plugin 8.8.1
Fixed
- Fix default layout params for compose snapshots
- Fix accessibility overlay drawing in root view instead of window manager
- Fix issue where unmergedNode has 0 elements
- Don't scale accessibility legend text when font scale is non-default
- Use compileOnly for kotlin/agp plugins
- Bypass font path prefix check in ResourcesCompat::loadFont
Kudos to @geoff-powell, @colinmarsch, @darshanparajuli, @DSteve595, @adamalyyan and others for contributions this release!
1.3.5
New
- Render pending recompositions for
@Composables that require a second layout pass - Support for overlays in accessibility snapshots
- Support for Compose UI heading and selected states in accessibility snapshots
- Support for toggleable state in accessibility snapshots
- Support for displaying multiple accessibility descriptions, similar to Talkback
- Include failure delta image in JUnit test reporting
- Migrate Paparazzi to layoutlib Jellyfish 2023.3.1
- Compose 1.7.5
- Kotlin 2.0.21
- [Gradle Plugin] Gradle 8.10.2
- [Gradle Plugin] Android Gradle Plugin 8.4.2
Fixed
- Improve Gradle test task caching by preventing overlapping outputs with snapshotOutputDir
- Migrate plugin to use modern AGP variant APIs
- Fix support for AndroidX ResourcesCompat.getFont()
- Fix inconsistent cross-platform text renderings in failure delta image
- Relax image comparisons with OffByTwo differ to work around cross-platform rendering issues
- Fix when clearAndSetSemantics is used to render content descriptions in accessibility snapshots
- Avoid invalid chars in Windows filenames
- Fix file move failures on Windows
- Avoid hash collisions when images have similar RGB content
- Cleanup unnecessary "loadPublicResourceNames" warning from log output
- Additional bug fixes with accessibility snapshot tests
Kudos to @geoff-powell, @colinmarsch, @BrianGardnerAtl, @ribafish, @gabrielittner and others for contributions this release!
1.3.4
New
- Support for animated-PNG-based snapshots using Paparazzi#gif
- New tasks! deletePaparazziSnapshots and cleanRecordPaparazzi${VARIANT} clear orphaned snapshots
- Add boolean flag to decide if image should be scaled or full-sized
- Migrate Paparazzi to layoutlib Iguana 2023.2.1 (now supports SDK 34!)
- Compose 1.5.14
- Kotlin 1.9.24
- [Gradle Plugin] Gradle 8.7
- [Gradle Plugin] Android Gradle Plugin 8.3.2
Fixed
- Fix long content description being cut off in accessibility snapshots
- Include resource references from generated resource folders
- Fix gradle caching for resources coming from aar dependencies
- Support SHRINK render mode when using unsafeUpdateConfig
- Fix issue where multiple snapshots fail when using render extensions
- Remove guava workaround from 1.3.2 now that Collector APIs are in guava-android
Kudos to @geoff-powell, @gamepro65, @kevinzheng-ap, @nak5ive, @TWiStErRob, @emuguy1 and others for contributions this release!
1.3.3
New
- Migrate Paparazzi to layoutlib Hedgehog 2023.1.1
- Compose 1.5.8
- Kotlin 1.9.22
- [Gradle Plugin] Gradle 8.6
- [Gradle Plugin] Android Gradle Plugin 8.2.1
Fixed
- Update the DeviceConfig screenWidth internally for accessibility tests
- Fix variant caching issues in new resource/asset loading mechanisms
- Remove legacy resources/assets loading mechanism
- Set HardwareConfig width and height based on orientation
- Apply round screen qualifier to device config
- Restrict Paparazzi's public API
- Remove obsolete NEXUS_5_LAND DeviceConfig
- Fix formatting so that all digits show upon failure
- Stop resolving dependencies at configuration time
- Use our own internal HandlerDispatcher for Compose Ui tests
- Include generated string resources
- Reset logger to prevent swallowing exceptions
Kudos to @gamepro65, @kevinzheng-ap, @BrianGardnerAtl, @adamalyyan, and others for contributions this release!
1.3.2
NOTE: Due to a known issue with how Guava now publishes its artifact, you will need to apply the following snippet workaround to your root build.gradle (Groovy-based, Kotlin impls will vary slightly):
subprojects {
plugins.withId("app.cash.paparazzi") {
// Defer until afterEvaluate so that testImplementation is created by Android plugin.
afterEvaluate {
dependencies.constraints {
add("testImplementation", "com.google.guava:guava") {
attributes {
attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
objects.named(TargetJvmEnvironment, TargetJvmEnvironment.STANDARD_JVM)
)
}
because("LayoutLib and sdk-common depend on Guava's -jre published variant." +
"See https://github.com/cashapp/paparazzi/issues/906.")
}
}
}
}
}
See also: google/guava#6801.
New
- Support for pseudolocalization tests! To get started:
@RunWith(TestParameterInjector::class)
class PseudolocalizationTest(
@TestParameter locale: Locale
) {
@get:Rule val paparazzi = Paparazzi(
deviceConfig = DeviceConfig.PIXEL_5.copy(locale = locale.tag)
)
@Test fun test() {
paparazzi.snapshot { SomeComposable() }
}
enum class Locale(val tag: String?) {
Default(null),
Accent("en-rXA"),
Bidi("ar-rXB")
}
}
- Migrate Paparazzi to layoutlib Giraffe 2022.3.1
- Compose 1.5.0
- Kotlin 1.9.0
- [Gradle Plugin] Gradle 8.5
- [Gradle Plugin] Android Gradle Plugin 8.1.1
Fixed
- Fix relativePath bug in port of ResourceFile
- Resolve report dir from ReportingExtension instead of hardcoding
- Make report folder variant-aware
- Remove reliance on kotlinx.coroutines.main.delay
- Use a class file locator that queries the system class loader
- Filter out unrecognized java-symbol tag warning
- Skip synthetic fields in R classes
- Update task inputs for resources and assets to account for file renames and moves
- Update delta images to support showing diff when width and height differ
Kudos to @kevinzheng-ap, @TWiStErRob, @gamepro65, @adamalyyan, @larryng, and others for contributions this release!