github cashapp/paparazzi 1.3.2

latest releases: 1.3.4, 1.3.3
4 months ago

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!

Don't miss a new paparazzi release

NewReleases is sending notifications on new releases.