diff --git a/README.md b/README.md index e5a3255b..fd25099f 100644 --- a/README.md +++ b/README.md @@ -1014,29 +1014,11 @@ roborazzi { } ``` -
-build.gradle version -
- -```groovy -roborazzi { - generateComposePreviewRobolectricTests.enable.set(true) - // The package names to scan for Composable Previews. - generateComposePreviewRobolectricTests.packages.set(["com.example"]) - // robolectricConfig will be passed to Robolectric's @Config annotation in the generated test class. - // See https://robolectric.org/configuring/ for more information. - generateComposePreviewRobolectricTests.robolectricConfig.set([ - "sdk": "[32]", - "qualifiers": "RobolectricDeviceQualifiers.Pixel5", - ]) - // If true, the private previews will be included in the test. - generateComposePreviewRobolectricTests.includePrivatePreviews.set(true) - // The fully qualified class name of the custom test class that implements [com.github.takahirom.roborazzi.ComposePreviewTester]. - generateComposePreviewRobolectricTests.testerQualifiedClassName.set("com.example.MyCustomComposePreviewTester") -} -``` - -
+> **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"]) +> ``` ## Manually adding Compose Preview screenshot tests diff --git a/docs/topics/preview_support.md b/docs/topics/preview_support.md index 8bf6a879..42ec43c2 100644 --- a/docs/topics/preview_support.md +++ b/docs/topics/preview_support.md @@ -45,30 +45,11 @@ roborazzi { } ``` -
-build.gradle version -
- -```groovy -roborazzi { - generateComposePreviewRobolectricTests.enable.set(true) - // The package names to scan for Composable Previews. - generateComposePreviewRobolectricTests.packages.set(["com.example"]) - // robolectricConfig will be passed to Robolectric's @Config annotation in the generated test class. - // See https://robolectric.org/configuring/ for more information. - generateComposePreviewRobolectricTests.robolectricConfig.set([ - "sdk": "[32]", - "qualifiers": "RobolectricDeviceQualifiers.Pixel5", - ]) - // If true, the private previews will be included in the test. - generateComposePreviewRobolectricTests.includePrivatePreviews.set(true) - // The fully qualified class name of the custom test class that implements [com.github.takahirom.roborazzi.ComposePreviewTester]. - generateComposePreviewRobolectricTests.testerQualifiedClassName.set("com.example.MyCustomComposePreviewTester") -} -``` - -
- +> **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"]) +> ``` ## Manually adding Compose Preview screenshot tests