airbnb / Showkase

🔦 Showkase is an annotation-processor based Android library that helps you organize, discover, search and visualize Jetpack Compose UI elements
https://medium.com/airbnb-engineering/introducing-showkase-a-library-to-organize-discover-and-visualize-your-jetpack-compose-elements-d5c34ef01095
Apache License 2.0
2.11k stars 107 forks source link

Showkase#getMetadata() is not generated #278

Closed anhanh11001 closed 1 year ago

anhanh11001 commented 1 year ago

The main question is how to get this generated?

The Showkase object is the receiver for all the helper methods that this library generates. Currently there are a few extension functions that are generated with the Showkase object as the receiver. In order to get access to these functions, you need to build the app once so that the methods can be generated for your use.

From the doc here, I have to build the app in order to do so. But what if I'm looking for @Preview components from n modules/libraries and there is no such things as an app in my libraries. For example, think of a design system library, there is no app, unless we build like an example app. How can I get that Showkase#getMetadata() generated?

Related: link. I'm trying to do similar thing here!