-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add roborazzi.compare.output.dir gradle.properties (#592)
## Behavior Changes to `roborazzi.outputDir.set(file("somedir"))` in `build.gradle` Previously, when modifying `roborazzi.outputDir`, such as setting it to `src/screenshots`, this option also affected the paths for comparison images, like `foo_compare.png`. This behavior often caused issues, such as unintentionally saving comparison images to version control systems (e.g., Git). To address this, we have discontinued this behavior. Comparison images are now saved in `build/outputs/roborazzi` by default, while the behavior for reference images remains unchanged. For users who wish to customize the path for comparison images, we have introduced a new option: `roborazzi.compare.outputDir`. While I don't believe there are strong use cases for this, if you want to save the comparison images in a custom directory as you did before, you can specify `roborazzi.compare.outputDir` as follows: ```kotlin roborazzi { outputDir.set(file("src/screenshots")) compare { outputDir.set(file("src/screenshots")) } } ``` I believe this adjustment will be highly beneficial for most use cases involving changes to `outputDir`. > [!NOTE] > By default, when you use `captureRoboImage("image.png")`, the image will be saved as `module/image.png`. > You can customize the file path strategy for the recorded image. The default strategy is `relativePathFromCurrentDirectory`. If you select `relativePathFromRoborazziContextOutputDirectory`, the file will be saved in the output directory specified by `roborazzi.outputDir`. > This can be configured in your `gradle.properties` file: > > ```properties > roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirectory > ```
- Loading branch information
Showing
5 changed files
with
168 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters