Skip to content
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

Add support for repeatable Annotations #40

Open
sergio-sastre opened this issue Jan 22, 2025 · 1 comment
Open

Add support for repeatable Annotations #40

sergio-sastre opened this issue Jan 22, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@sergio-sastre
Copy link
Owner

This would allow more advance use cases like screenshot testing animations as discussed here
takahirom/roborazzi#633 (comment)

@sergio-sastre
Copy link
Owner Author

Repeatable annotations are tricky when scanning them in compiled classes, what would be necessary for
supporting them when scanning in "screenshotTest" and "androidTest" source sets.
I'd like to avoid the hassle and make the code more complicated without adding real value.

Therefore, for now, the recommended workaround is to use arrays in a non-repeatable annotation.
Moreover, since ComposablePreviewScanner 0.5.1, using repeatable annotations will throw a "RepeatableAnnotationNotSupported" exception, at least, till I add support for them.

I doubt it will cause any trouble or anyone was using them, since they could not be properly retrieved by using getAnnotation<MyRepeatableAnnotation>()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant