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.1k stars 107 forks source link

Showkase.getBrowserIntent() not generated when there are no showkase previews #334

Open matejdro opened 1 year ago

matejdro commented 1 year ago

When there are no previews in the app, Showkase.getBrowserIntent() will not get generated even if there is a @ShowkaseRoot present.

Ideally, this Intent should still be generated, but be empty of course.

Our use case for this is that we want to include Showkase into a template project that we create other projects from (and this project includes full Showkase setup). However, because of this issue, template project will not build, because there are no Composables in it.

vinaygaba commented 11 months ago

Yeah I think this will help make the library be more deterministic. Especially the APIs that are generated at the top level should probably be generated to make sure there are no build failures when there are no composables.