Skip to content

Commit

Permalink
Fix documentation README tag
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirom committed Dec 7, 2024
1 parent 0537abf commit 2483aff
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 54 deletions.
52 changes: 26 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Generated by ./gradlew generateReadme. Do not edit this file. -->
<div name="topic_top">
<!-- topic_top -->

<!-- Generated by docs/topics/top.md. Do not edit this file. -->
# Roborazzi
Expand Down Expand Up @@ -43,8 +43,8 @@ efficient and reliable testing process by capturing screenshots with Robolectric

In the DroidKaigi 2023 app, Roborazzi was introduced from the early stages of development as part of the architectural design. This integration allowed the team to verify changes throughout the development process. The specific architectural decisions and how they were implemented can be found [README](https://github.com/DroidKaigi/conference-app-2023#screenshot-testing-with-robolectric-native-graphics-rng-and-roborazzi).

</div>
<div name="topic_try_it_out">
<!-- end -->
<!-- topic_try_it_out -->

<!-- Generated by docs/topics/try_it_out.md. Do not edit this file. -->
# Try it out
Expand Down Expand Up @@ -73,8 +73,8 @@ add `@GraphicsMode(GraphicsMode.Mode.NATIVE)` to your test class.
@GraphicsMode(GraphicsMode.Mode.NATIVE)
```

</div>
<div name="topic_build_setup">
<!-- end -->
<!-- topic_build_setup -->

<!-- Generated by docs/topics/build_setup.md. Do not edit this file. -->
# Build setup
Expand Down Expand Up @@ -316,7 +316,7 @@ Roborazzi uses `module/build/outputs/roborazzi` as the default directory for ref
roborazzi {
// Directory for reference images
outputDir.set(file("src/screenshots"))
// Directory for comparison images
// Directory for comparison images (Experimental option)
compare {
outputDir.set(file("build/outputs/screenshots_comparison"))
}
Expand All @@ -327,10 +327,10 @@ roborazzi {
> 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 `RoborazziRule.Options.outputDirectoryPath`.
> This can be configured in your `gradle.properties` file:
```properties
roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirectory
```
>
> ```properties
> roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirectory
> ```
### Add dependencies
Expand All @@ -340,8 +340,8 @@ roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirector
| Jetpack Compose | `testImplementation("io.github.takahirom.roborazzi:roborazzi-compose:[version]")` |
| JUnit rules | `testImplementation("io.github.takahirom.roborazzi:roborazzi-junit-rule:[version]")` |
</div>
<div name="topic_how_to_use">
<!-- end -->
<!-- topic_how_to_use -->
<!-- Generated by docs/topics/how_to_use.md. Do not edit this file. -->
# How to use
Expand Down Expand Up @@ -959,8 +959,8 @@ Please refer to [Accessibility Check](https://github.com/takahirom/roborazzi/blo
Please check out [RoborazziOptions](https://github.com/takahirom/roborazzi/blob/main/include-build/roborazzi-core/src/commonJvmMain/kotlin/com/github/takahirom/roborazzi/RoborazziOptions.kt) for available Roborazzi options.
</div>
<div name="topic_preview_support">
<!-- end -->
<!-- topic_preview_support -->
<!-- Generated by docs/topics/preview_support.md. Do not edit this file. -->
# Experimental Compose Preview Support
Expand Down Expand Up @@ -1010,7 +1010,7 @@ roborazzi {
}
```
> **Note**
> [!NOTE]
> If you are using build.gradle instead of build.gradle.kts, you need to use the set method for each assignment, like
> ```kotlin
> generateComposePreviewRobolectricTests.packages.set(["com.example"])
Expand Down Expand Up @@ -1039,8 +1039,8 @@ Currently, we don't support all the annotation options provided by the Compose P
You can check the supported annotations in the [source code](https://github.com/takahirom/roborazzi/blob/0810ceb7133e6ec38472046cb741242a5ef6ab9e/roborazzi-compose-preview-scanner-support/src/main/java/com/github/takahirom/roborazzi/RoborazziPreviewScannerSupport.kt#L27).
We are looking forward to your contributions to support more annotation options.
</div>
<div name="topic_ai_powered_image_assertion">
<!-- end -->
<!-- topic_ai_powered_image_assertion -->
<!-- Generated by docs/topics/ai_powered_image_assertion.md. Do not edit this file. -->
# Experimental AI-Powered Image Assertion
Expand Down Expand Up @@ -1148,8 +1148,8 @@ compareOptions = RoborazziOptions.CompareOptions(
...
```
</div>
<div name="topic_idea_plugin">
<!-- end -->
<!-- topic_idea_plugin -->
<!-- Generated by docs/topics/idea_plugin.md. Do not edit this file. -->
# Roborazzi IntelliJ IDEA and Android Studio Plugin
Expand All @@ -1161,8 +1161,8 @@ Demo of Roborazzi IntelliJ IDEA and Android Studio Plugin.
[https://github.com/takahirom/roborazzi/assets/1386930/bd3e8106-1971-4ec4-b764-3f1831999228](https://github.com/takahirom/roborazzi/assets/1386930/bd3e8106-1971-4ec4-b764-3f1831999228)
The Roborazzi plugin enhances your development workflow by automatically displaying screenshots related to Roborazzi's screenshot tests within IntelliJ IDEA. Easily view and verify visual outputs directly in your IDE, streamlining your testing and development process.
</div>
<div name="topic_compose_multiplatform">
<!-- end -->
<!-- topic_compose_multiplatform -->
<!-- Generated by docs/topics/compose_multiplatform.md. Do not edit this file. -->
# Multiplatform support
Expand Down Expand Up @@ -1361,8 +1361,8 @@ The sample image
![MainJvmTest test_2](https://github.com/takahirom/roborazzi/assets/1386930/2edc828c-6fd8-4a9a-8f3d-b0e7baa85f0d)
</div>
<div name="topic_gradle_properties_options">
<!-- end -->
<!-- topic_gradle_properties_options -->
<!-- Generated by docs/topics/gradle_properties_options.md. Do not edit this file. -->
# Roborazzi gradle.properties Options and Recommendations
Expand Down Expand Up @@ -1437,8 +1437,8 @@ android {
it.systemProperties["robolectric.pixelCopyRenderMode"] = "hardware"
}
```
</div>
<div name="topic_faq">
<!-- end -->
<!-- topic_faq -->
<!-- Generated by docs/topics/faq.md. Do not edit this file. -->
# FAQ
Expand Down Expand Up @@ -1575,7 +1575,7 @@ Additionally, it might be worth trying to run your tests with VisualVM to monito
**A:** It is discussed in [this issue](https://github.com/takahirom/roborazzi/issues/493).
To enable the display of Roborazzi tasks, please enable ***Configure all Gradle tasks during Gradle Sync (this can make Gradle Sync slower)*** in the Settings | Experimental | Gradle.
<img src="https://github.com/user-attachments/assets/67fbb2a8-6b2a-458c-bb31-99025f1c1cab" width="800" />
</div>
<!-- end -->
### LICENSE
Expand Down
40 changes: 20 additions & 20 deletions README.template.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
<!-- Generated by ./gradlew generateReadme. Do not edit this file. -->
<div name="topic_top">
</div>
<div name="topic_try_it_out">
</div>
<div name="topic_build_setup">
</div>
<div name="topic_how_to_use">
</div>
<div name="topic_preview_support">
</div>
<div name="topic_ai_powered_image_assertion">
</div>
<div name="topic_idea_plugin">
</div>
<div name="topic_compose_multiplatform">
</div>
<div name="topic_gradle_properties_options">
</div>
<div name="topic_faq">
</div>
<!-- topic_top -->
<!-- end -->
<!-- topic_try_it_out -->
<!-- end -->
<!-- topic_build_setup -->
<!-- end -->
<!-- topic_how_to_use -->
<!-- end -->
<!-- topic_preview_support -->
<!-- end -->
<!-- topic_ai_powered_image_assertion -->
<!-- end -->
<!-- topic_idea_plugin -->
<!-- end -->
<!-- topic_compose_multiplatform -->
<!-- end -->
<!-- topic_gradle_properties_options -->
<!-- end -->
<!-- topic_faq -->
<!-- end -->

### LICENSE

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,12 @@ tasks.register("generateReadme") {
def newReadmeContent = readmeContent
println(topics)
topics.forEach { topic ->
def pattern = Pattern.compile("<div name=\"topic_${topic.name}\">.*?</div>", Pattern.DOTALL)
def pattern = Pattern.compile("<!-- topic_${topic.name} -->.*?<!-- end -->", Pattern.DOTALL)
def result = pattern.matcher(newReadmeContent).find()
println("topic: $topic pattern: $pattern result: $result")

def generatedComment = "<!-- Generated by $topicsPath/${topic.name}.md. Do not edit this file. -->"
def newTopicContent = "<div name=\"topic_${topic.name}\">\n\n$generatedComment\n${topic.content}\n<\\/div>"
def newTopicContent = "<!-- topic_${topic.name} -->\n\n$generatedComment\n${topic.content}\n<!-- end -->"
newReadmeContent = pattern.matcher(newReadmeContent)
.replaceAll(newTopicContent)
}
Expand Down
10 changes: 5 additions & 5 deletions docs/topics/build_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ Roborazzi uses `module/build/outputs/roborazzi` as the default directory for ref
roborazzi {
// Directory for reference images
outputDir.set(file("src/screenshots"))
// Directory for comparison images
// Directory for comparison images (Experimental option)
compare {
outputDir.set(file("build/outputs/screenshots_comparison"))
}
Expand All @@ -248,10 +248,10 @@ roborazzi {
> 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 `RoborazziRule.Options.outputDirectoryPath`.
> This can be configured in your `gradle.properties` file:
```properties
roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirectory
```
>
> ```properties
> roborazzi.record.filePathStrategy=relativePathFromRoborazziContextOutputDirectory
> ```
### Add dependencies
Expand Down
2 changes: 1 addition & 1 deletion docs/topics/preview_support.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ roborazzi {
}
```

> **Note**
> [!NOTE]
> If you are using build.gradle instead of build.gradle.kts, you need to use the set method for each assignment, like
> ```kotlin
> generateComposePreviewRobolectricTests.packages.set(["com.example"])
Expand Down

0 comments on commit 2483aff

Please sign in to comment.