Skip to content

fix(deps): update roborazzi to v1.50.0 #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 11, 2025

This PR contains the following updates:

Package Change Age Confidence
io.github.takahirom.roborazzi 1.46.1 -> 1.50.0 age confidence
io.github.takahirom.roborazzi:roborazzi-junit-rule 1.46.1 -> 1.50.0 age confidence
io.github.takahirom.roborazzi:roborazzi-compose 1.46.1 -> 1.50.0 age confidence
io.github.takahirom.roborazzi:roborazzi 1.46.1 -> 1.50.0 age confidence

Release Notes

takahirom/roborazzi (io.github.takahirom.roborazzi)

v1.50.0

Compare Source

Fixed: Resolved Gradle task dependency errors with Android Gradle Plugin 8.12+ where GenerateComposePreviewRobolectricTestsTask output was used by compilation tasks without explicit dependencies. Thank you @​papo2608 for reporting this issue.

What's Changed

Full Changelog: takahirom/roborazzi@1.49.0...1.50.0

v1.49.0

Compare Source

ComposablePreviewScanner 0.7.0 Compatibility Update
Breaking Change - Compatibility Update Required

This release addresses a breaking compatibility issue with ComposablePreviewScanner 0.7.0 that affects users of Roborazzi's Preview support feature.

The Problem

When using ComposablePreviewScanner 0.7.0 with previous versions of Roborazzi, you'll encounter NoSuchMethodError at runtime. This happens because:

  • Method relocation: ComposablePreviewScanner 0.7.0 moved methods from AndroidPreviewScreenshotIdBuilder to provide common PreviewScreenshotIdBuilder methods for Glance and Compose Multiplatform
  • Import mismatch: Previous Roborazzi versions contain generated code with outdated import statements
  • Runtime failure: Auto-generated Roborazzi tests from Previews crash when trying to execute methods at their old locations
The Solution

This Roborazzi update replaces the old method calls and import statements with new ones compatible with ComposablePreviewScanner 0.7.0+. However, since these new method locations don't exist in ComposablePreviewScanner 0.6.x, you must update both libraries together.

⚠️ Required Action

If you use Roborazzi's Preview support, you must:

  • Update Roborazzi to this version
  • Update ComposablePreviewScanner to 0.7.0 or later

Both updates are required - updating only one will cause build or runtime errors.

Migration Steps
// Update both dependencies together
implementation "io.github.takahirom.roborazzi:roborazzi:1.49.0"
implementation "io.github.sergio-sastre.ComposablePreviewScanner:android:0.7.0" // or newer
Improved Error Detection

We've added clear build-time error messages to help you identify when this compatibility issue occurs, so you'll know exactly what needs to be updated instead of encountering cryptic runtime errors.

Common Update Scenarios

Scenario 1: Update only ComposablePreviewScanner to 0.7.0
NoSuchMethodError with old Roborazzi. Update Roborazzi to resolve.

Scenario 2: Update only Roborazzi
→ Compile-time error with clear message to update ComposablePreviewScanner ✅

Acknowledgments

Thanks to @​sergio-sastre for collaboration on resolving this compatibility challenge and maintaining the ComposablePreviewScanner library.

What's Changed

Full Changelog: takahirom/roborazzi@1.48.0...1.49.0

v1.48.0

Compare Source

Fix Preview Size Retention Bug

Fixed issue where @Preview annotation size attributes (heightDp/widthDp) incorrectly persisted between captures

Problem

Subsequent previews without explicit size would inherit dimensions from previous previews instead of using defaults.

Solution

Save and restore Robolectric qualifiers properly in captureRoboImage() to ensure preview size isolation.

Thanks to @​smuldr for reporting this issue!

Breaking Changes: Update Libraries

You can see the changes at: https://github.com/takahirom/roborazzi/actions/runs/16952566040

Overall, we are now using Kotlin 2.0.21. We don't chase the latest versions, but we want to add tests using the latest Compose Multiplatform Previews. Thank you for letting me know about this! @​sergio-sastre

What's Changed

Full Changelog: takahirom/roborazzi@1.47.0...1.48.0

v1.47.0

Compare Source

Compose Preview Tester Customization

Added Capturer interface to AndroidComposePreviewTester for customizing capture behavior (#​716). This allows setting custom
comparison thresholds and other RoborazziOptions for generated Compose preview tests.

import com.dropbox.differ.SimpleImageComparator
import com.github.takahirom.roborazzi.*

@​ExperimentalRoborazziApi
class MyCustomComposePreviewTester(
  private val defaultCapturer: AndroidComposePreviewTester.Capturer = AndroidComposePreviewTester.DefaultCapturer()
) : AndroidComposePreviewTester(
  capturer = { parameter ->
    val customOptions = parameter.roborazziOptions.copy(
      compareOptions = parameter.roborazziOptions.compareOptions.copy(
        // Set custom comparison threshold (0.0 = exact match, 1.0 = ignore differences)
        imageComparator = SimpleImageComparator(maxDistance = 0.01f)
      )
    )
    defaultCapturer.capture(
      parameter.copy(roborazziOptions = customOptions)
    )
  }
)

Fixes #​703. Thanks @​pavel163 for the issue report and @​sergio-sastre for the review!

What's Changed

New Contributors

Full Changelog: takahirom/roborazzi@1.46.1...1.47.0


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

emerge-tools bot commented Aug 11, 2025

🛰️ Build Distribution

Build available for installation

App Name App ID Platform Version Tag Install Page
Hacker News com.emergetools.hackernews android 1.0.3 release 🔗 Install Build

🛸 Powered by Emerge Tools

@renovate renovate bot force-pushed the renovate/roborazzi branch from 5956ff5 to 838d904 Compare August 14, 2025 11:02
@renovate renovate bot changed the title fix(deps): update roborazzi to v1.47.0 fix(deps): update roborazzi to v1.48.0 Aug 14, 2025
@renovate renovate bot force-pushed the renovate/roborazzi branch from 838d904 to 6cd62bc Compare August 19, 2025 04:38
@renovate renovate bot changed the title fix(deps): update roborazzi to v1.48.0 fix(deps): update roborazzi to v1.49.0 Aug 19, 2025
@renovate renovate bot force-pushed the renovate/roborazzi branch from 6cd62bc to 3dc1643 Compare August 23, 2025 02:38
@renovate renovate bot changed the title fix(deps): update roborazzi to v1.49.0 fix(deps): update roborazzi to v1.50.0 Aug 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants